Help Needed with Apache Rewrite Rules for .html Check and Redirection
Hi everyone,
I'm currently working on a project where I need to set up some rewrite rules. The goal is to check if a requested page has a .html extension. If it doesn't, the request should be redirected to a 404.html page. Here's what I have so far:
RewriteCond "%{REQUEST_URI}" "^/content/project/(.*)"
RewriteRule "/(.*)" "/%1" [L,R=301,NE]
RewriteRule "/(.*)(.html)$" "/content/project/$1.html" [PT,NE]
I'm looking for advice on how to modify these rules to achieve the desired functionality, without breaking any existing functionality. Any suggestions or improvements would be greatly appreciated!
Thanks in advance for your help!


