Reputation: 145
I have the following .htaccess rule:
RewriteRule ^([^/.]+)/([^/.]+)/?$ ?page=search&type=$1&city=$2 [L]
This one works great.
When i'm trying to have another .htaccess rule as the following:
RewriteRule ^profile/([^/.]+)?$ ?page=profile&name=$1 [L]
The first one is overwriting this rule, and when im trying to access profile/test I get to the ?page=search page.
Is there any way to fix this issue?
Upvotes: 1
Views: 34
Reputation: 1712
Place your second htaccess rule above first one , so it will working
RewriteRule ^profile/([^/.]+)?$ ?page=profile&name=$1 [L]
RewriteRule ^([^/.]+)/([^/.]+)/?$ ?page=search&type=$1&city=$2 [L]
Upvotes: 1