multiple rewriting rules problem

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
bernie67
-


Joined: 08 Apr 2011
Posts: 1

PostPosted: Fri Apr 08, 2011 8:37 am    Post subject: multiple rewriting rules problem Reply with quote

Hi!

I managed to convert my .htaccess rewrite rules, however I can´t get them all to work, only the one I put first.

I´ve tried different combinations with Next Action but no success.

Ex:

regex: ^/([A-Za-z0-9_-]+)$
rewrite to: /user.php?u_url=$1

works fine by itself

regex: ^/([^\.]+)$ (to get rid of .php ext)
rewrite to: /$1.php

works fine by itself

Whichever rule I put on top works, but then the other one fails.
I´ve tried all sorts of combinations with the other settings but I feel I´m missing something obvious here.

Please advice,

Bernie
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Fri Apr 08, 2011 2:22 pm    Post subject: Re: multiple rewriting rules problem Reply with quote

bernie67,

Try enabling URL rewriting debugging to understand why each rule is triggered or not.

From what you've given us as rules, depending on the URL, it looks like these two rules are running fine but since their scope are mutually exclusive, they seem to you as if only one of them is actually being taken into account.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group