Hi wondering if someone could help. I’m sure this is a simple thing. I am still learning
I made a .htaccss file to rewrite urls to not include .html
It works great until it is a url with a dash in it (ex. website.com/privacy-policy)
Webflow creates these slugs with a dash by default. If I change them to one word without a dash it works. If it has a dash, causes a 404 error. I would prefer to keep the dashes.
What changes to .htaccess file I created do I need to make to allow dashes?
RewriteEngine On
RewriteCond %{THE_REQUEST} [1]{3,9}\ /. index\ HTTP/
RewriteRule ^(. )index$ http://YOURWEBSITE.COM/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://YOURWEBSITE.COM/$1 [L,R=301]
RewriteCond %{THE_REQUEST} [2]{3,9}\ /(.+).html\ HTTP/
RewriteRule ^(.+).html$ http://YOURWEBSITE.COM/1 [L,R=301] RewriteRule ^([a-z]+) /$1.html [L]