: 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
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.
More posts by @Heady270
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.