Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress 404

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #45814
    Ricky55
    Member

    I’ve created a custom 404.php for me theme but when I try to view on my local machine I just get a random web page rather than my 404.

    I mean if I go to http://domain/notaurl

    Do I need to write this into my htaccess like you would for a static site? Didn’t think I’d need to do that. It may well work on a live server not tested but how can I get working locally?

    Cheers

    #140209
    TheDoc
    Member

    Go to Settings > Permalinks and hit ‘Save’ just to make WordPress recreate its setting in the .htaccess, something might have gone wrong with it.

    Did you name your file `404.php`? That’s the only way WordPress will know to use that page.

    #140243
    Ricky55
    Member

    Thanks ill try that, yes I did name 404.php

    #140309
    Ricky55
    Member

    Tried that Doc and it doesn’t seem to work. Any other ideas?

    #140310
    TheDoc
    Member

    Is the rest of the site permalinks working? For example, if you go http://domain/some-link, does that work?

    #140325
    Senff
    Participant

    Sometimes, WordPress goes to a page that almost has the same URL. I’m not 100% sure why, I’ve seen it happen with my own sites, and it’s possible it did that because the page was renamed or something. For example, http://domain/some-link would exist, but if you’d go to http://domain/somelink it would go to the same page.

    Maybe that’s what’s happening?

    What do you mean with “I just get a random web page rather than my 404, is it really random? It changes when you refresh? Does it change the URL into the page you’re viewing/

    #140343
    Ricky55
    Member

    Yes all other links are working fine. I have a local domain set up under http://mff-theme so when I visit say http://mff-theme/blog works no problem.

    But when I enter http://mff-theme/aaa for example the URL switches to https://mff-theme/aaa (https) and this part of the URL mff-theme/about-us/aaa gets entered as a Google search and google throws results as if I’m trying to run a search.

    Hope that makes sense.

    Any ideas?

    #140378
    Alen
    Participant

    You most likely didn’t set up your virtual host correctly. Issue is with apache not wordpress.

    #140383
    Ricky55
    Member

    I thought that might be the case. Everything else works fine, any ideas of where to look? Just set up as I do all my other hosts.

    #140405
    Ricky55
    Member

    Im using mamp pro, I know where the conf file is just don’t know what to change.

    #140480
    Ricky55
    Member

    Just tried using the default permalinks and it still does the same. Also tried on a different WP install with default theme and still does the same so its obviously nothing to do with WP and all to do with my local machine set up with MAMP.

    Anyone know what I need to change in my local set up?

    #140590
    TheDoc
    Member

    Make sure mod_rewrite is working properly. Might have to look at your httpd.conf.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Other’ is closed to new topics and replies.