MOD-重写规则 - 多余的301重定向 [英] Mod-Rewrite Rule - Unwanted 301 Redirect

查看:252
本文介绍了MOD-重写规则 - 多余的301重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/8224419/htaccess-clean-url-unwanted-301-redirect-1and1">.htaccess,清洁网址,不需要的301重定向,的1and1

则mod_rewrite重定向。

Mod_Rewrite is redirecting.

RewriteRule ^viewPage/([^/]+)/([^/]+)/$ /viewPage.php?ID=$1&Title=$2 [NC,L]

键入到浏览器:

Typing into browser:

www.domain/viewPage/123/abc/

浏览器加载按预期的页面,但该网址已被301重定向到:

the browser loads the page as expected but the URL has been 301 redirected to:

www.domain/viewPage.php?ID=123&Title=abc

我不想让页面从www.domain /的ViewPage / 123 / ABC /重定向到www.domain / viewPage.php ID = 123安培;?标题= ABC

I don't want the page to redirect from www.domain/viewPage/123/abc/ to www.domain/viewPage.php?ID=123&Title=abc.

我如何得到这个工作;我有一种感觉,这是做301永久移动的地位仍然是apache的缓存?

How do I get this to work; I have a feeling this is to do with "301 Moved Permanently" status still in apache cache"?

此外,一个或多个音符。在家里的笔记本电脑,它正在按照需要,但它打破了的1and1服务器上。

Also, one more note. On the home laptop it is working as desired but it is breaking on the 1and1 server.

推荐答案

使用Chrome的隐身模式。这就是我正在做这样的测试。 在Ubuntu的10.04我的发射器是:

Use chrome in incognito mode. That's what I'm doing for such tests. Under Ubuntu 10.04 my launcher is:

/usr/bin/chromium-browser --start-maximized --incognito %U

所以,我放弃了一切铬每次被删除。而且它的所有的在违背firefox其中的一些东西,如DNS缓存保持和301的都在积极缓存无论你在私人模式或没有。

So each time I quit Chrome everything is deleted. And it's everything in contrary to Firefox where some stuff like DNS caching is kept and 301's are aggressively cached whether you're in private mode or not.

这篇关于MOD-重写规则 - 多余的301重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆