似乎得到了太多的重定向"尝试从旧站点放置所有301s时出错。它似乎特别适用于子文件夹中的任何页面(即博客)
尝试通过强制非www over https开始。然后重定向具有URL更改的单个页面。
htaccess目前看起来像这样:
RewriteEngine On
# Yoast SEO - XML Sitemap Rewrite Fix
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
# END Yoast SEO - XML Sitemap Rewrite Fix
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options +FollowSymLinks
# match any URL with www and rewrite it to https without the www
RewriteCond %{HTTP_HOST} ^(www\.)(.*) [NC]
RewriteRule (.*) https://%2%{REQUEST_URI} [L,R=301]
# match urls that are non https (without the www)
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^(www\.)(.*) [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Original Site Redirects (From the previous website)
Redirect 301 /tell https://example.com/contact
Redirect 301 /blog https://example.com/blog
Redirect 301 /sitemap https://example.com/sitemap_index.xml
Redirect 301 /blog/asking-help https://example.com/asking-for-financial-help
Redirect 301 /blog/planning-special-needs https://example.com/financial-planning-for-special-needs
什么工作:
什么不行?
我在俯瞰什么?