Now the site has a redirect via .htaccess from any pages on /index.php except robots.txt
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/robots\.txt$ RewriteRule ^(.*)$ index.php [L,QSA]
but when I try to go to the root of the site (/), it naturally goes to index.php and then again redirects and loops. How to disable redirect for root ( site.com/
) and index.php file ( site.com/index.php
)?
UPD
Did so:
RewriteEngine On RewriteBase / RewriteRule ^about$ /pages/about.php RewriteRule ^contact$ /pages/contact.php RewriteRule ^portfolio$ /pages/portfolio.php RewriteRule ^home$ /pages/index.php RewriteRule ^blog$ /pages/blog.php [L]
And in the engine file I made a check: if the main one is a redirect to / home