httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob <bobnli...@gmail.com>
Subject [users@httpd] Re: Removing query string through .htaccess
Date Thu, 21 May 2015 13:18:49 GMT

I'm also successful with following but goes to home page, can't preserve the actual link


RewriteCond %{THE_REQUEST} \?[^\ ]+
RewriteRule (.*) /$1? [R=302,L]


On Thu, 21 May 2015 12:23:42 +0000
Bob <bobnlinux@gmail.com> wrote:

> Hello All,
> 
> I have already gone through a no. of links for removing query strings and till now all
are going back to domain.
> The one I'm using presently is
> 
> ``````````````
> RewriteCond %{QUERY_STRING} .
> RewriteRule ^$ /? [R=302,L]
> 
> `````````````````````
> 
> As obvious the above goes back to homepage, but is there any rule set which just remove
the query string and keep the url intact ?
> 
> like http://mywxample.com/any_page/?xyz should be changed as http://mywxample.com/any_page
> 
> Any help is very much appreciated.
> 
> with regards,
> Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message