Jump to content

404 Not Working


unemployment

Recommended Posts

I have added the code below to my .htaccess and have 404.php in my root directory:

 

# ----------------------------------------------------------------------

# Custom 404 page

# ----------------------------------------------------------------------

 

# You can add custom pages to handle 500 or 403 pretty easily, if you like.

ErrorDocument 404 /404.php

 

 

The problem I am having is that when I go to http://trekeffect.com/sss, that should redirect to my 404, but it doesn't.  Instead I get:

 

Not Found

 

The requested URL /sss was not found on this server.

Apache/2.2.21 (Ubuntu) Server at trekeffect.com Port 80

 

Do you know why?

Link to comment
https://forums.phpfreaks.com/topic/268608-404-not-working/
Share on other sites

Does your apache allow override in the server definition?

 

My virtual host file has:

 

<VirtualHost *:80>

        DocumentRoot /var/www/trekeffect.com/trekeffect.com

        ServerName www.trekeffect.com

        ServerAlias trekeffect.com

 

        <Directory />

                Options FollowSymLinks

                AllowOverride None

        </Directory>

        <Directory /var/www/>

                Options Indexes FollowSymLinks MultiViews

                AllowOverride None

                Order allow,deny

                allow from all

        </Directory>

</VirtualHost>

 

Link to comment
https://forums.phpfreaks.com/topic/268608-404-not-working/#findComment-1379622
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.