WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] page not found (4 posts)

  1. Exploiter
    Member
    Posted 2 years ago #

    lets say my site is http://www.example.com and a user tries to go to http://www.example.com/gg they will get "
    Not Found
    The requested URL http://www.example.com/gg was not found on this server.
    "
    how can i make it so that if a user types something like this it redirects to a 404?

  2. Johnb81
    Member
    Posted 2 years ago #

    Hi Exploiter,

    In the .htaccess which can be found in the root of your WordPress installation add the following code:

    ErrorDocument 404 /[pathtopage]/[page]

    Replace [pathtopage] and [page] entries with real values, i.e. the new 404 error page you will be using.

    Basically you are instructing your web server that each time someone requests a non existing URL, instead of forwarding him or her to the default 404 error page, the user is redirected to the newly specified 404 page.

    If you do not see .htaccess file via FTP, make sure your FTP client is configured to show hidden files. If there isn't any, create a new one.

  3. Exploiter
    Member
    Posted 2 years ago #

    Thank you So Much Johnb81 That Did it

  4. Johnb81
    Member
    Posted 2 years ago #

    Great. It would be good if you can mark this post as resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.