mod_rewrite for selectors with .html
- by user1720607
We have a website where the URL looks something like,
www.example.com/about.smart.html
( "smart" being selector added on the app server based on the useragent if its a smart phone device)
We need to redirect the page to 404 if the URL is changed by the user as like below:
www.example.com/about.abc.xyz.smart.html
www.example.com/about.smart.abc.html
I tried with the below rule, but this redirects to 404 only for 1) and not for 2)
RewriteCond %{REQUEST_URI} !^(.*)(-)\.html$
RewriteRule (.*)\.(.*).smart.html$ - [R=404,L]
Any pointers on this would be of great help.