Johnny000
Johnny000

Reputation: 2104

htaccess mod rewrite

I want to rewrite the newsletter page of my site to url.com/newsletter/ the problem is, I have another rule overlapping this step. The rules looks like this :

RewriteRule ^([^/]*)/$ /index.php?categories=$1 [L,QSA]  //Primeryrule overlapping the secondary rule 
RewriteRule ^newsletter/$ /?newsletter=$1 [L]

Is there any possibility to apply special case rules or something like that (I don't want to use any workaround like .html or .php extension or stuff like this, just the url as above).

Upvotes: 0

Views: 32

Answers (2)

lampwins
lampwins

Reputation: 920

Apache reads these rules from the top down. So put your new rule first and then the existing rule and give it a try.

Upvotes: 1

Johnny000
Johnny000

Reputation: 2104

Just found the solution, that I need to keep the newsletter rule on top of the other rule to make it apply first.

Upvotes: 0

Related Questions