|
Home > Archive > Apache Server configuration support > October 2006 > problem with mod rewrite
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
problem with mod rewrite
|
|
| dieguicho 2006-10-30, 1:20 pm |
| hi people.. i need to do this...
RewriteRule ^(.+)/gallery$ /gallery.php?SITEID=3D$1 [L]
and then... when the user enters this url
testing/gallery?page=3D1
i need to return
/gallery.php?SITEID=3Dtesting&page=3D1
only works with SITEID variable!
what i=B4m doing wrong?
| |
| Davide Bianchi 2006-10-30, 1:20 pm |
| On 2006-10-30, dieguicho <dieguicho@gmail.com> wrote:
> and then... when the user enters this url
> testing/gallery?page=1
From the docs:
Note: Query String
The Pattern will not be matched against the query string. To do this,
you must use a RewriteCond with the %{QUERY_STRING} variable. You can,
however, create URLs in the substitution string, containing a query string
part.
Davide
--
I once heard Bill Gates say, "WHAT?!?! netscape caused an invalid page
fault!?! Only Microsoft programs have the code to do that!"
| |
| dieguicho 2006-10-30, 1:20 pm |
| wooow thx... how can i do that? new for me!
Davide Bianchi wrote:
> On 2006-10-30, dieguicho <dieguicho@gmail.com> wrote:
>
> From the docs:
>
> Note: Query String
>
> The Pattern will not be matched against the query string. To do this,
> you must use a RewriteCond with the %{QUERY_STRING} variable. You can,
> however, create URLs in the substitution string, containing a query string
> part.
>
> Davide
>
> --
> I once heard Bill Gates say, "WHAT?!?! netscape caused an invalid page
> fault!?! Only Microsoft programs have the code to do that!"
| |
| Jim Hayter 2006-10-30, 1:20 pm |
| dieguicho wrote:
> hi people.. i need to do this...
>
> RewriteRule ^(.+)/gallery$ /gallery.php?SITEID=$1 [L]
>
> and then... when the user enters this url
> testing/gallery?page=1
>
> i need to return
> /gallery.php?SITEID=testing&page=1
>
> only works with SITEID variable!
> what i´m doing wrong?
>
If I read this correctly, your example using "testing" is an attempt to
use your RewriteRule. If so, all you are missing is the QSA switch.
Change [L] to [L,QSA].
Jim
|
|
|
|
|