Forum Moderators: phranque

Message Too Old, No Replies

More mod rewrite problems :(

         

jayskates

1:46 pm on Jul 7, 2011 (gmt 0)

10+ Year Member



Is it possible to have two rules, with similar variables like this:

RewriteRule ^([^/]*)uct/([^/]*)\.php$ index.php?p=$1&name=$2

and

RewriteRule ^([^/]*)/([^/]*)\.php$ index.php?p=$1&type=$2

I need to rewrite both of these urls,

[buschsystems.com...]

and

[buschsystems.com...]

When I try, i'm only able to do one or tohe other... if I try to use both, the other stops working!

I've been searching for a few days but have been unable to find a solution.

Thanks!

g1smd

6:11 pm on Jul 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Add the [L] flag to BOTH rules so that processing doesn't run on after the first rule matches.

^([^/]*)uct/([^/]*)\.php$
allows
example.com/uct/.php
as a valid URL. Replace * with + here.

Replace the second
[^/]*
with
[^/.]+
(two changes).