Reputation: 2659
I got a content page where content is dynamically loaded. I use htaccess for this, to make sure every page that ends with .html becomes a correct content page.
With this line:
RewriteRule ^(.*).html /content.php?alias=$1 [L]
I want to do the same with a landingspage, but because of the line above it always redirects to the content page instead of the landingspage.
RewriteRule ^advies/(.*).html _lp.php?trefwoord=$1 [L]
The above line does only work when I remove the first one.
How can I work around this?
Upvotes: 1
Views: 17
Reputation: 785256
Have it like this:
RewriteRule ^advies/(.+)\.html$ _lp.php?trefwoord=$1 [L,QSA,NC]
RewriteRule ^(.+)\.html$ /content.php?alias=$1 [L,QSA,NC]
i.e. keep the generic rule at the end.
Upvotes: 3