Apache mod_rewrite内部重写,新URL显示

Apache mod_rewrite内部重写,新URL显示,apache,.htaccess,mod-rewrite,redirect,url-rewriting,Apache,.htaccess,Mod Rewrite,Redirect,Url Rewriting,我正在使用Mod_Rewrite将我网站上的一些旧页面(内部)重写为新页面 这项工作: RewriteRule ^thispage\.html$ thatpage.html 问题是页面会更改为新页面(这很好!),但不会将(URL)名称从“thispage”更改为“thatpage”,因此用户会被提示到新地址。Apache(2.x)声明在上述脚本之后放置一个[R],即 RewriteRule ^thispage\.html$ thatpage.html [R] 这可能会让用户知道它已更改,并

我正在使用Mod_Rewrite将我网站上的一些旧页面(内部)重写为新页面

这项工作:

RewriteRule ^thispage\.html$ thatpage.html 
问题是页面会更改为新页面(这很好!),但不会将(URL)名称从“thispage”更改为“thatpage”,因此用户会被提示到新地址。Apache(2.x)声明在上述脚本之后放置一个
[R]
,即

RewriteRule ^thispage\.html$ thatpage.html [R]
这可能会让用户知道它已更改,并将其发送到新页面

当我添加
[R]
时,我得到一个500错误。服务器是Apache/1.3.33

我认为强制服务器显示新url的唯一方法是在重写时使用重定向。有什么想法吗

衷心感谢您的帮助

你试过这个吗

RewriteRule ^thispage.html$ thatpage.html [R=301,L]
或者,在服务器上重定向比重写更容易

Redirect 301 thispage.html http://yourDomain.com/thatpage.html

对于不显示新url,必须删除[R],因为
[R] 用于显示新url

,只需添加“[R]”即可。您的htaccess中还有其他内容吗?