[英]301 Redirect with Wordpress?
the following Redirect is not working, but why is the second one working when I place this before the Wordpress code in the .htaccess file? 以下重定向不起作用,但是当我将其放置在.htaccess文件中的WordPress代码之前时,为什么第二个重定向不起作用?
Not working: 无法运作:
RewriteEngine On
RewriteRule ^/euro/stadien/saint-etienne/$ /stadien/saint-etienne/? [R=301,L]
Working: 工作方式:
Redirect 301 /euro/stadien/saint-etienne/ /stadien/saint-etienne/
Do I need to add something like the following to the first piece of code? 我需要在第一段代码中添加以下内容吗?
RewriteBase /
RewriteCond
Anybody knows the solution? 有人知道解决方案吗?
You can use: 您可以使用:
RewriteEngine On
RewriteRule ^euro/stadien/(saint-etienne)/$ /stadien/$1/? [R=301,L,NC]
mod_rewrite
rules while in .htaccess 在.htaccess中, mod_rewrite
规则中的前导斜杠不匹配
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.