.htaccess - Implementing MediaWiki Short Url example.com/Main_Page while still giving access to robots.txt -


for following .htaccess how allow access robots.txt?

rewriteengine on rewritecond %{http_host} ^www\.(.+)$ [nc] rewriterule ^[^:]*\. - [l] rewriterule ^[^:]*\/ - [l] rewriterule ^/*$ /w/index.php?title=main_page [l,qsa] rewriterule ^(.+)$ /w/index.php?title=$1 [l,qsa] 

generally, mod_rewrite, check if file exists, , if does, not go somewhere else.

after initial rewritecond, add

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d 

only if file or directory not exist name requested, continue on rewriterule's.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -