Help with conditional refresh

Realign02

Regular Member
Joined
Aug 13, 2007
Messages
475
Reaction score
325
Any help with this would be really appreciated.

I'm advertising with G adwords and my CC processor only allows the URL I submit, so they allow mysite.com/test but G adwords changes it to mysite.com/test/?=45ljlj (Their code)

Is there a way to setup my page to redirect anything that's added on to the end?

For example redirect mysite.com/test/(ANYTHING HERE) to mysite.com/test

Thanks again for the help.
 
You should be able to do this with mod_rewrite and your .htaccess file

A quick search yields this solution, although you should do your own due diligence since i suck at mod_rewrite :D

Code:
[B]Removing the Query_String[/B]

On many sites, the page will be displayed for both page.html and page.html?anything=anything, which hurts your SEO with duplicate  content. An easy way to fix this issue is to redirect external requests  containing a query string to the same uri without the query_string.

RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTP/
RewriteCond %{QUERY_STRING} !^$
RewriteRule .* http://www.askapache.com%{REQUEST_URI}? [R=301,L]
 
Back
Top