Some Help With QUERY_STRING?

This is a discussion on Some Help With QUERY_STRING? within the Linux Web Servers forums, part of the Web Server and Related Forums category; I have been trying, in vain, to take something like http://www.helloworld.com/?browse=/Earth to http://www.helloworld....


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-06-2008
maria
 
Posts: n/a
Default Some Help With QUERY_STRING?

I have been trying, in vain, to take something like

http://www.helloworld.com/?browse=/Earth

to

http://www.helloworld.com/images/ind...?browse=/Earth

Notice the slash in "/$browse".

How do I do it?

Thank!

maria
  #2 (permalink)  
Old 02-06-2008
Jim Hayter
 
Posts: n/a
Default Re: Some Help With QUERY_STRING?

maria wrote:
> I have been trying, in vain, to take something like
>
> http://www.helloworld.com/?browse=/Earth
>
> to
>
> http://www.helloworld.com/images/ind...?browse=/Earth
>
> Notice the slash in "/$browse".
>
> How do I do it?
>
> Thank!
>
> maria


Something along these lines (untested):
RewriteEngine on
RewriteCondition %{QUERY_STRING} ^browse=(.*)$
RewriteRule ^/$ /images/index.php?browse=%1 [R=permanent,L]

It's not clear to me if you want a redirect or just handle this
internally to the web server. In the latter case, you would rewrite to
the internal location of the script and drop the flags.

Jim
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0