My website is breaking

Username (e.g. epiz_XXX) or Website URL

epiz_31731400

Error Message

(website) redirected you too many times.

Other Information

My website is not functioning properly, it is at https://www.afhstudio.ml/ and there is an image here. Try clicking the About section to get the following error message.

1 Like

It is working for me:

Try clearing your cache.

2 Likes

Try going on https://afhstudio.ml/error/404/, does it work for you?

You cannot have a folder called error. It does not work properly here. Try renaming the folder to something like errors and then see if it works.

4 Likes

How about errorcodes? afhstudio.ml/errors/404 is a folder from the web server that I cannot access.

Maybe?
I think errorcodes will work.

Nope, didn’t work.

errorcodes does work for me on my hosting here. Can you share the contents of your .htaccess and 404.html file?

2 Likes

.htaccess:

DirectoryIndex index.php index.html index.htm index2.html
ErrorDocument 403 https://afhstudio.ml/errorcodes/403
ErrorDocument 404 https://afhstudio.ml/errorcodes/404
ErrorDocument 500 https://afhstudio.ml/errorcodes/500
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L,NC]

RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

ProxyPass "/arc-sw.js"  "https://arc.io/arc-sw.js"
ProxyPassReverse "/arc-sw.js"  "https://arc.io/arc-sw.js"
CheckSpelling on
php_value date.timezone 'America/Toronto'
SetEnv TZ America/Toronto

RewriteCond %{REQUEST_URI} /+[^.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

404.html:

<h1>404 Not Found</h1>

By the way, all of my error pages are just h1s with the error code in it.

Remove this and try.


If you are trying to get clean urls (eg. no .php extension) this is the correct solution:

# Remove .php extension
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
#Remove .html extension
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
4 Likes

Thanks, you saved our website!

Akshayan, from afhstudio.ml :slight_smile:

4 Likes

You’re welcome!

4 Likes

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