0
這裏是我的.htaccess文件的內容:
RewriteEngine On
# RewriteBase /home/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home/index.php [L]
# RewriteRule ^/home$/[L]
# Redirect 301 /home/<-- this catches /home and /home/, BUT also /home/wp-login.php :/
# Redirect 301 /home$/<-- doesn't catch /home or /home/, still see error page
我試圖讓http://example.com/home
,http://example.com/home/
301重定向到http://example.com
。什麼是魔術重定向代碼,使其發生,其中,/home/{anything-else}
保持放,但是,/home/
和/home
301重定向到http://example.com
?謝謝。