开发者

.htacces implemented - URL not correctly refreshing

开发者 https://www.devze.com 2023-03-11 18:18 出处:网络
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

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

精彩评论

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