Jump to content
mdedens

Can Mod_rewrite 301 Redirect This Url With Variables?

Recommended Posts

I have this URL, but can't get it to 301 redirect without appending variables to the end of the static URL.

 

Is there a way around this?

 

>redirect 301 /Default.asp?page=32 http://***DomainName***/about-us/

 

This only applies to a few URLs, so I just need an example of this specific URL 301 redirected.

 

I also tried this to no avail:

>RewriteRule ^Default.asp?page=32 /about-us/? [R=301,NC,L]

 

Any advice is appreciated.

Share this post


Link to post
Share on other sites

I believe this should work

 

>RewriteCond %{QUERY_STRING} page=32 [NC]
RewriteRule ^Default.asp$ /about_us/? [R=301,NC,L]

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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...