I can't access without the .html

Username (e.g. epiz_XXX) or Website URL

https://ilate.great-site.net/

Error Message

error 500

Other Information

I have set it up in the .htaccess so i can use a link without the .html but it doesn’t work for one specific file contacts.html. Help :D.

I happened to fix it by renaming it to contact.html :confused: ig that works

What is the .htaccesa rule that you’re using?

2 Likes
# Turn on Rewrite Engine
RewriteEngine On
# Deny URLs Not Composed of “a-zA-Z0-9.+/-?=&” characters
RewriteCond %{REQUEST_URI} !^/(wp-login.php|wp-admin/|wp-content/plugins/|wp-includes/).* [NC]
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ [a-zA-Z0-9\.\+_/\-\?\=\&]+\ HTTP/ [NC]
RewriteRule .? - [F,NS,L]
# Force / Suffix
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)([^/])$ https://%{HTTP_HOST}/$1$2/ [L,R=301]
# Remove ?i=1
RewriteCond %{QUERY_STRING} ^(.*)i=[^&]+(.*)$ [NC]
RewriteRule ^(.*)$ /$1?%1%2 [R=301,L]
# Forward Documents to .html Internally
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ $1.html [L]
# Forward Documents to .php Internally
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
# Force https:// Prefix
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
<IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
</IfModule>
# Remove www. Prefix
RewriteCond %{HTTP_HOST} ^www\.
RewriteCond %{HTTPS}s ^on(s)|off
RewriteCond http%1://%{HTTP_HOST} ^(https?://)(www\.)?(.+)$
RewriteRule ^ %1%3%{REQUEST_URI} [R=301,L]
# Remove .html Suffix
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1/ [R=301,L]
# Remove .php Suffix
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1/ [R=301,L]

Maybe this rule:
Options +MultiViews

Thanks, I’ll try it out later.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.