.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'
精彩评论