Mobile app version of vmapp.org
Login or Join
Heady270

: Most CMS systems use a .htaccess file with some rewrite rules to handle all the URLs on your site. It is usually possible to add an exception to those rules such that certain files (such

@Heady270

Most CMS systems use a .htaccess file with some rewrite rules to handle all the URLs on your site.

It is usually possible to add an exception to those rules such that certain files (such as robots.txt) are not handled by the CMS system.

An example of such a rule (from here) is:

RewriteCond %{REQUEST_URI} !^(/index.php|/assets|/robots.txt|/sitemap.xml|/favicon.ico)
RewriteRule ^(.*)$ /index.php/ [L]


The rewrite condition is what stops the following rewrite rule from taking effect. the ! means "not", the ^ is "starts with" and the | means "or". So the condition translates to: "the uri doesn't start with index.php, assets, robots.txt, sitemap.xml, or favicon.ico." Creating a similar rewrite condition in your .htaccess file should solve your problem.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme