开发者

.htacces implemented - URL not correctly refreshing

I am using .htaccess. I have a rule:

RewriteRule ^pg/([a-zA-Z0-9/_-]+)?$ index.php?page=$1 [QSA]

One of my page has a URL: http://domain.com/pg/page1

In this page there is a meta refresh tag:

<meta 开发者_StackOverflowhttp-equiv='refresh' content='0;URL=pg/page2'>

Now, when this page get refresh..the new url which is formed is: http://domain.com/pg/pg/page2 i.e. pg is coming twice.

I have already specified a base href tag in header as:

<base href='http://domain.com'>

Why pg/ is coming twice and how to get rid of it. Thanks.


Make sure you start the path with a forward slash ('/'), e.g. '/pg/page1'

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜