I'm currently running this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.html
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
But when an inner .html file requests a CSS or JS file, I'm getting an error "resource not found" and the URL to the file looks something like:
www.domain.com/the-inner-page/js/script.js
instead of
/js/script.js
Can I add something to the .htaccess file to avoid this issue?
Thanks!
/, that means that the link is a relative link and not a full link. You have to use full links or use../in the inner pages