Answer the question
In order to leave comments, you need to log in
How to form the page url correctly?
Tell me how to solve the problem correctly using htaccess
There is a site.ru site. You
need to remove Index.php in the address bar for all pages and sections of the site.
But for example, leave it for the site.ru/blog/index.php section.
Thank you in advance!
Answer the question
In order to leave comments, you need to log in
Excuse me, but leave him a sense? "site.ru/blog/index.php", as a rule, it is removed from visibility, but in fact it is present, the routing is simply prescribed.
.htaccess
mod_rewrite must be enabled in PHP and will then work for PHP versions above 5.2.6.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question