【发布时间】:2021-04-15 19:45:33
【问题描述】:
所有流量都将来自
https://oldsite.com/
到
https://www.newsite.com
我正在为以下内容寻找 301 通配符重定向解决方案
https://oldsite.com/blog/*(the slug)
到
https://www.newsite.com/blog/*(matching slug)
使用的htaccess文件是:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
【问题讨论】:
-
欢迎来到 SO,请在您的问题中分享您的 htaccess 规则文件,谢谢。
-
RewriteBase / RewriteRule 上的 RewriteEngine ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule 。 /index.php [L]
标签: .htaccess mod-rewrite mod-alias