Streaming live at 10am (PST)

404 page is not properly showing when URL ends with /


#1

Hello everyone,

I have just updated my website from Wordpress to Webflow with much less content and now I need a proper 404 for all the old "empty" links.

The problem is:

www.simonfreund.com/sakdjasd – will work just fine.
www.simonfreund.com/sakdjasd/ – does not

I have changed the htaccess to make the 404 work in the first place to:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html

ErrorDocument 404 /404.html

I´m sure this is easy fixed, I just don´t know how.

Any help is highly appreciated.

Thanks,
Simon


Here is my public share link: LINK
(how to access public share link)


#2

unfortunetly this sounds like an issue you will work out with your Website host.

If you tell us who your hosting company is other users who also use that company might be able to help you with your problem.


#3

Hi Alex,

Thanks for the tip but they said, they can´t help me... Either because they don´t know what´s the mistake here, or because they really are not capable of doing something...

Super frustrating... especially since the none formatted link on this page: www.simonfreund.com/sakdjasd/ does not work, so you can not leave this error page...

Damn.

Any other ideas?


#4

Hi Alex ( and everyone having the same problem ),

I fixed it by updating the htaccess file with:

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

It basically says that

www.yourdomain.com/asdkjaslkd ( without slash ) – is the same as
www.yourdomain.com/asdkjaslkd/ ( with slash )

So now both work for the error 404 page.

Best,
Simon


#5

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