I want to set up redirects:

1) /../name/ (if name / not a file and not a folder) -> /../name.html

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/$ RewriteCond %{REQUEST_URI} (.*)/$ RewriteRule . %1.html [R=301,L] 

2) /../name (if name is not a file and not a folder) -> /../name.html

 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^(\w+)$ RewriteCond %{REQUEST_URI} (.*)$ RewriteRule . %1.html [R=301,L] 

There was a problem: if 'name' is not among the folders and names of pages, then instead of 404 errors I get: /../name.html.html.html.html so indefinitely. What am I wrong?

    0