WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] page view results in 404 (12 posts)

  1. serons
    Member
    Posted 2 years ago #

    When I create a page and click the view button I always get a 404 error. For example I've made an about page with the permalink http://wp.dev/sitename/index.php/about/ .

    What could be the problem here?

    I've installed WordPress 3.3.2 locally and use nginx 1.0.15.

  2. loughcorrib
    Member
    Posted 2 years ago #

    Seems it is just your permalink structure
    did you use /%index.php%/%postname%/
    Just go to your permalinks and have a look

  3. serons
    Member
    Posted 2 years ago #

    If I set permalink to default setting it becomes http://wp.dev/sitename/?page_id=2 and a page is displayed. Any other setting results in a permalink as above with the same 404 error.

    Could it be a file system permissions issue? If so, where is this stored?

  4. loughcorrib
    Member
    Posted 2 years ago #

    Go to permalinks and use i.e. the date save this go to your post edit and update it do you have the new link showing above post. Let me know how you get on

  5. serons
    Member
    Posted 2 years ago #

    I tried to follow your suggestion and selected the permalink setting "Month and day" and the clicked the "Save changes" button. Then I edited and updated the About page. The permalink url on that page remains the same. I.e. it's on the form http://wp.dev/sitename/about-page . There are no parts in the url for month, day etc.

    As you may have seen the index.php part of the url is gone as I've used a plugin called "nginx Compatibility".

    It seems to me that the problem is with nginx and the way it handles WordPress permalink urls, as described at http://forum.nginx.org/read.php?2,222511,222517 . I tried to follow the guide mentioned there but it could not make it work, and made a separate post about it http://forum.nginx.org/read.php?2,226209 .

  6. loughcorrib
    Member
    Posted 2 years ago #

    Serons,

    One thing it is sometimes advizable to refresh your browser a few times when you make url changes as your own cache can produce results. Have been caught out with this myself.

    If not:
    Appears you indeed have a plugin issue, Can you deactivate it and try my suggestion again.

  7. serons
    Member
    Posted 2 years ago #

    I've disabled the plugin. The only difference it makes is that the index.php reappears in the permalink url, like in my original post.

    I've also tried clearing the browser cache and using another browser.

  8. loughcorrib
    Member
    Posted 2 years ago #

    Ok so your problem lies with ht access So you will have to create one here is a link to help you with that.Check first to see if the plugin needs write permission to your files.

    Permalinks

  9. serons
    Member
    Posted 2 years ago #

    There's no problem in generating a .htaccess file if that is what you mean. A non-default permalink setting updates the file.

    In further testing I've installed wordpress in a different directory with the same results regarding the pretty permalinks. The 404 error is however gone so that seems to be a different problem. Permalink settings produce one of these permalinks for the Sample Page:

    http://wptest.dev/?page_id=2 (default permalink setting)
    http://wptest.dev/index.php/sample-page/ (any other permalink setting)

  10. loughcorrib
    Member
    Posted 2 years ago #

    Serons,
    You won't believe this I can't access your main url

    http://wptest.dev
    Have you taken it down

    However I think you will have to go down the ht.access route. At least you will be able to control perms yourself from here

    Best of luck with it, Have to go now and have a row with my provider, To all appearances they can't read emails even though they are in English.
    Let me know your result
    I'll call back to see how you are getting on

  11. serons
    Member
    Posted 2 years ago #

    My server is local and not accessible from outside my LAN. That is the reason you can't access it.

    I've discovered something interesting. Permalinks works as expected for posts but not for pages. I've been trying all along with pages. Are pretty permalinks not supposed to work with pages?

    Good luck with your provider.

  12. serons
    Member
    Posted 2 years ago #

    I think I've got it now. Pretty permalinks with dates do not make much sense with pages, at least not to me. I'll be content with the way it works now.

    I can use the nginx compatibility plugin to cut out the index.php part out of the url.

    Thanks very much for your help and most for being there.

Topic Closed

This topic has been closed to new replies.

About this Topic