开发者

htaccess rewrite query on homepage URL problem

I want to make a RewriteRule rule so when someone goes to the base index of my site eg:

example.com/

I want this to happen:

Rew开发者_开发问答riteBase /
RewriteRule ^/ /index.php?pageID=1

So when someone goes to the homepage; a query for pageID=1 is sent.

However the above code doesn't work, going to the homepage with the above code doesn't get the query sent. (other rewrite rules are working correctly)

Any help would be appreciated. Thanks.


Remember RewriteRule has no / at the beginning of it!

RewriteRule ^$ index.php?pageID=1


RewriteCond %{REQUEST_URI} ^/?$
RewriteRule ^(.*)$ /index.php?pageID=1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜