Jump to content

Query string being parsed in re-write


Recommended Posts

Hi guys,

 

Got a problem with my rewritten url.

 

A folder name has been changed and I have set a RedirectMatch rule which works, but it appends the querystring to the end of the url.

 

RedirectMatch 301 ^/folder-name/(.*)$ http://www.domain.com/new-folder-name/$1

 

returns

 

http://www.domain.com/new-folder-name/page.html?cat1=folder-name&page=list

 

Any ideas how to get rid of the querystring?

Link to comment
Share on other sites

The underlying rule is

 

RewriteRule ^(.*)/(.*).html$ template.php?cat1=$1&page=$2 [L]

 

Although the redirect works, the value that is showing up in the querystring for cat1 is the old value.

Could this be the cause of the querystring showing up - the fact that the cat1 value is not being updated?

 

If so, how can I fix this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.