Hi Phil,

Thanks for the reply.

I changed the rule to use a single (.*)  but the result was the same.

Here is an example of the url entered ..
http://www.mysite.com/products/specials&filter=20

and expecting

http://www.mysite.com/products/index.php?view=specials&filter=20

RewriteRule products/specials(.*) /products/index.php?view=specials&$1=$2
[L]

The rewritten url is close but still has the trailing '='.

Thanks.
Adam



Philip Wigg wrote:
> 
>> I have the following rewrite rule ..
>>
>> RewriteRule products/specials(.*)(.*)
>> /products/index.php?view=specials&$1=$2 [L]
>>
>> http://www.mysite.com/products/specials&filter=20
>> --> http://www.mysite.com/products/index.php?view=specials&filter=20=
>>
>> The problem is the trailing '='
>>
>> I have also tried RewriteRule wheels/specials([0-9]+)
>> /wheels/index.php?view=specials&$1 [L]
>> but this rule results in internal server errors.
> 
> One problem in your first rule is that the '(.*)(.*)' part. (.*)(.*)
> is functionally equivalent to just a single (.*), so your $2 will
> always be empty (this is causing the trailing =). Maybe just try:-
> 
> RewriteRule products/specials(.*) /products/index.php?view=specials&$1 [L]
> 
> If that's not what you're after, I think I'd need a couple of examples
> of the URL you're trying to rewrite and what you're expecting it to be
> rewritten to, as I don't completely understand it at the moment.
> 
> Cheers,
> Phil.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>    "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/RewriteRule-help-please-tp26475922p26476797.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to