.htaccess 重命名规则用于重写但在内部追加
.htaccess rename rule for rewrite but internally append
我有一个 URL 形式的 www.aroundnext.org/Scholastic/Home
,如何在内部附加 Scholastic
的同时将其更改为 www.aroundnext.org/Home
RewriteEngine On
RewriteRule ^Scholastic/Home/(.*)$ /Home/ [R=301,NC,L]
这会重定向旧目录 (www.aroundnext.org/Scholastic/Home) to a new directory (www.aroundnext.org/Home) 中的文件。该文件必须存在于新目录中才能运行。
我有一个 URL 形式的 www.aroundnext.org/Scholastic/Home
,如何在内部附加 Scholastic
www.aroundnext.org/Home
RewriteEngine On
RewriteRule ^Scholastic/Home/(.*)$ /Home/ [R=301,NC,L]
这会重定向旧目录 (www.aroundnext.org/Scholastic/Home) to a new directory (www.aroundnext.org/Home) 中的文件。该文件必须存在于新目录中才能运行。