2

I have this code setup in .htaccess

RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

however, when I try to access www.example.com/example, it only shows the files in that page, not actual content. I'm just trying to get it to be www.example.com/example instead of www.example.com/example.html

tao
  • 82,996
  • 16
  • 114
  • 150
Moemin
  • 33
  • 6

0 Answers0