.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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -