[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Removing Session ID


On Sat, 28 Jan 2006, William Fiore wrote:

Thanks to the help of this forum I have a number of working rewrite rules
in my .htaccess file but the following one has been stumping me all day. I
am trying to redirect the following url:

From: www.url.com/ic/sku.html?a_aid=1234
To: www.url.com/ic/sku.html

My Rewrite Rule looks like:

RewriteCond %{QUERY_STRING} a_aid
RewriteRule ^(.*)$ $1? [L,R=301]

I have restarted interchange but it still doesn't seem to work. Any help
would be greatly appreciated.

Try this:

RewriteCond %{QUERY_STRING} a_aid
RewriteRule .* %{REQUEST_URI}? [R=301]

I believe the problem is that your (.*) match isn't a full URL or even an absolute URI (with a leading /) so it's not clear what to redirect to, and Apache must be ignoring it altogether.

Note that adding the ? to remove the a_aid GET argument also removes any other GET arguments in the URL, which may or may not be what you want.

Jon

--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.