很失落。我正在尝试使用 .htaccess 将旧站点 (old.com/folder) 的 URL 重写为站点的更新版本 (new.com),
old.com/folder 应该变成 new.com 的地方
论坛表明 .htaccess 将以这种方式编写用于标准 URL 更改
RewriteEngine On
RewriteCond %{HTTP_HOST} old.com$ [NC]
RewriteRule ^folder/(.*)$ http://www.new.com/$1 [R=301,L]
但是当前的 .htaccess 文件具有以下重写以清理 URL:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.+) /folder/index.php
.htaccess 文件应该是什么样子才能保持重写的结构(无 index.php)并重定向到新站点?
前任。old.com/folder/a/a >>>>> new.com/a/a