我正试图在我的.htaccess文件中添加一个重定向,我正在与URL中的+符号作斗争。
下面是我在.htaccess文件中重定向条目
Redirect 301 "^http://www.emfs.info/glossary/glossary+c.htm$" "http://www.emfs.info/glossary-2/"任何帮助都是最好的。
发布于 2014-10-10 19:44:55
Redirect directive不接受正则表达式模式。emfs.info,则不需要使用整个URL来确保正在加载mod_alias。<代码>H211<代码>G212RedirectMatch permanent /?glossary/glossary+c.htm$ /glossary-2/将其放入文档根目录下的.htaccess文件中。如果您想要使用mod_rewrite的其他方法,请尝试以下方法:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} www\.emfs\.info$
RewriteRule ^/?glossary/glossary\+c.htm$ /glossary-2/ [R=301,L]将此文件放入htaccess文件中的相同位置。
https://stackoverflow.com/questions/26295635
复制相似问题