0
我想将所有流量重定向到主页,除了任何具有/ google /目录的东西。我想保留默认的Wordpress重写,以便index.php被删除。将所有流量重定向到主页,除了一页以外
# Need to leave certain files alone
RewriteCond %{REQUEST_URI} !.(gif|jpeg|png|css|js|woff|ttf|eot|svg|otf|woff2|jpg)$
# No redirects on home page (obviously)
http://example.com
# Everything else should redirect back to http://example.com (home)
http://example.com/*
# All variations of the following should NOT redirect
http://example.com/google/
http://example.com/google
http://example.com/google/index.php
谢谢!
什么是与默认WP规则结合使用?我尝试了类似的规则,并导致重定向循环。如果它有效,我会给这个镜头并标记为答案。谢谢 – DeFeNdog