Reputation: 409
I would like to check if a user enters a website via one of the following urls
(en|nl|fr|de|es|pl|sv|it|cs|el|fi|hu)/(home|business|product|contact|faq|gallery|videos|locator)
else, i would like to redirect the user to the 404 page.
i've tried this:
RewriteRule !^((en|nl|fr|de|es|pl|sv|it|cs|el|fi|hu)/(home|business|product|contact|faq|gallery|videos|locator)|404)$ /404 [L,R=307]
but this gives me a routing loop.
Any idea on how to solve this?
Upvotes: 1
Views: 22
Reputation: 41848
Use this:
RewriteCond %{REQUEST_FILENAME} !^404|(?:css|js|jpg|gif|png)$ [NC]
RewriteRule !^(en|nl|fr|de|es|pl|sv|it|cs|el|fi|hu)/(home|business|product|contact|faq|gallery|videos|locator) - [L,R=404]
Upvotes: 1