Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.