1
我该如何着手重新指导父目录而不是子级?看到我下面的具体问题。所有和任何帮助表示赞赏!301重定向 - 重定向父级,但不是子级
家长 -
redirect 301 /community/whats-happening http://www.stapletondenver.com/whats-happening/
- 重定向父目录
儿童 -
redirect 301 /community/whats-happening/celebrating-halloween-stapleton http://www.stapletondenver.com/whats-happening/celebrating-halloween-in-stapleton/
我已经试过的其他选项没有成功了一把。见下:
RewriteRule ^community/whats-happening/. /whats-happening/ [R=301,L]
RewriteRule ^community/whats-happening/(.*)$ /whats-happening/$1 [R=301,NC,L]
RewriteRule ^/?community/whats-happening/?$ http://www.stapletondenver.com/whats-happening/ [R=301]
RewriteRule ^community/whats-happening/(.*) http://stapletondenver.com/whats-happening/$1 [R=301,L]
RewriteRule ^community/whats-happening/(.*)/(.*)/? http://stapletondenver.com/whats-happening/$1/ [R=301,L]
非常感谢您的详细解释,即伟大工程!重定向总是让我有所有的变化。在这里学到了很多,再次感谢! – user2105735