Answer the question
In order to leave comments, you need to log in
How to make htaccess redirect to a file and not to a folder?
Made a cnc redirect from /test.html to /test
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html - f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
But it doesn't work if there is a folder with the same name as the html file!
will open the folder and I need to open the file) how can I do this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question