.htaccess: Rewrite rule issue, how to redirect all to admin panel
问题 I want to redirect my website to admin panel Like localhost/website/ => localhost/website/admin localhost/website/login => localhost/website/admin localhost/website/blog => localhost/website/admin Here is my created rule RewriteEngine on RewriteCond $1 !^(index\.php) RewriteRule ^(.*)$ /website/admin/$1 [L] But this is not working 回答1: The following code will redirect everything to your admin page, keeping the attributes. This also applies to files who already exist ! RewriteEngine On