Answer the question
In order to leave comments, you need to log in
How to correctly implement redirection in mod_rewrite?
How to correctly implement in mod_rewrite redirect
http://site/admin/ to admin.php
http://site/
http://site/other/ to index.php
do this
AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin\/$ admin.php
RewriteRule ^(.*)$ index.php
Answer the question
In order to leave comments, you need to log in
AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /
RewriteRule ^admin\/$ admin.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question