在不改变网址mod-rewrite转发 [英] mod-rewrite forwarding without changing URL
问题描述
我有一个小问题,我的Apache配置打造pretty的URL时。我得到它的阶段,输入(或linkig为此事),以
I have a small problem with my Apache configuration when creating "pretty" URLs. I've got it to the stage where typing (or linkig for that matter) to
index.html的
index.html
转发你
的index.php?PAGEID = Forside
index.php?pageID=Forside
这正是我想要的。 但是,我怎么能得到的index.html留在浏览器的地址栏? 现在它向前和改变URL到原来的。
that is exactly what I want. But how can I get index.html to stay in the address bar of the browser? Right now it forwards and changes the URL to the original one.
下面我的.htaccess:
Here my .htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} index\.html
RewriteRule .* http://www.radoor-designs.dk/index.php?pageID=Forside [L]
和在它之前有人评论:选项+的FollowSymLinks缺少,因为它触发错误500 one.com webhotel
And before someone comments on it: Options +FollowSymLinks is missing since it triggers an error 500 on a one.com webhotel.
在此先感谢!
推荐答案
只是尝试用下面的例子:
RewriteEngine On
RewriteRule ^index\.html$ /index.php?pageID=Forside [L]
我觉得这可能会帮助您解决您的问题。
I think this may help you to resolve your problem.
这篇关于在不改变网址mod-rewrite转发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!