我试图用我继承的站点重定向,我没有构建原始的htaccess
目前,当我点击谷歌的关于链接,它只需要我404登陆页,而我希望它带我到about_us页面.
RewriteBase /
RewriteRule ^showroom$ index.php?route=showroom/showroom [L]
RewriteRule ^blog$ index.php?route=blog/home [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteRule ^about$ https://www.example.ie/about_us/ [R,L]
发布于 2014-10-24 09:15:41
在内部路由规则之前,您需要保留重定向规则:
RewriteEngine On
RewriteBase /
RewriteRule ^about$ https://www.example.ie/about_us/ [R,L]
RewriteRule ^showroom$ index.php?route=showroom/showroom [L]
RewriteRule ^blog$ index.php?route=blog/home [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^(.*)$ index.php?_route_=$1 [L,QSA]
https://stackoverflow.com/questions/26552649
复制相似问题