重写网址而不是重定向?

时间:2014-10-22 13:00:16

标签: php apache .htaccess mod-rewrite redirect

我在.htaccess文件中有以下规则,它们应该重写URL中不包含index.php

RewriteEngine On

RewriteCond %{REQUEST_URI} !index.php
RewriteRule (.*)$ index.php?q=$1 

所以,我想在我的浏览器http://example.com/website.com中打开,并在该网址下返回回复,但不是这样,我被重定向到http://example.com/index.php?q=website.com。有办法解决这个问题吗?

0 个答案:

没有答案
相关问题