Strip Query String from URI?
  Home FAQ Contact Sign in
comp.infosystems.www.servers.unix only
 
Advanced search
POPULAR GROUPS

more...

comp ... servers.unix Profile…
 Up
Strip Query String from URI?         


Author: Michael Ruebner
Date: Jun 15, 2008 07:35

Apologies for a question that has been asked before, but I'm running into
problems with a (at least I thought so) straight-forward mod_rewrite
ruleset. I'm trying to pass a couple of params via GET while redirecting
clients to the receiving script's query-less URI. This is what I pulled from
askapache.com, but the query string still shows up:

RewriteEngine On
RewriteBase /
RewriteCond %%{QUERY_STRING} .
RewriteRule ^my_script.php /my_script.php? [L]

Is it me, or are there more sinister forces at work?

Any pointers greatly appreciated.

Mike
2 Comments
Re: Strip Query String from URI?         


Author: Álvaro G. Vicario
Date: Jun 16, 2008 11:30

*** Michael Ruebner escribió/wrote (Sun, 15 Jun 2008 16:35:35 +0200):
> Apologies for a question that has been asked before, but I'm running into
> problems with a (at least I thought so) straight-forward mod_rewrite
> ruleset. I'm trying to pass a couple of params via GET while redirecting
> clients to the receiving script's query-less URI. This is what I pulled from
> askapache.com, but the query string still shows up:
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %%{QUERY_STRING} .
> RewriteRule ^my_script.php /my_script.php? [L]

Add a redirect flag:

... [L,R]

Otherwise, the query string is removed but it's transparent to the user.

--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
no comments
Re: Strip Query String from URI?         


Author: Michael Ruebner
Date: Jun 17, 2008 13:36

no comments

RELATED THREADS
SubjectArticles qty Group
SUBSTRING in query of queriesmacromedia.coldfusion.cfml_general_discussion ·