本文介绍了网址中有空格时,htaccess重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从仍然显示在Google搜索中的旧网址重定向到新网址。旧网址是这样的:
I want to redirect from a old url which still appears in the google search to the new one. the old url is this:
www.marionettecolla/file%20_mostra_milano/mostra_marionette-milano.htm,我想将其重定向到主页:
and I want to redirect it to the home page:
www.marionettecolla/我在.htaccess中使用了它:
I used this in my .htaccess:
Redirect marionettecolla/file\ _mostra_milano/mostra_marionette-milano.htm marionettecolla/但我收到错误500 ...有人知道如何解决这个问题吗?
but I am getting Error 500... Does anybody know how to solve this problem?
推荐答案您不能只逃避像这样的空间 \ 。正确的方法是 \s 。
You can't just escape space like that "\ ". The proper way to do it is "\s".
尽管我不确定是否用 \s代替htaccess文件中的空格可以解决问题。请让我知道它是否有效。
Although I am not sure if putting "\s" in place of space in htaccess file would do the trick. Please let me know if it worked.
更多推荐
网址中有空格时,htaccess重定向
发布评论