WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks won't work on local PC (19 posts)

  1. What in my configuration of my local PC would stop permalinks from working? I get a 404 when I click on a permalink.

    http://linked.viper007bond.com/local_phpinfo.htm

    I see mod_rewrite in there. :/

  2. Cypher
    Member
    Posted 8 years ago #

    I've always had problems with permalinks on my local Windows installation of Apache, but things work great on my Linux installation. I also have mod_rewrite in both instances, it'd be good to know what the problem is.

    Regards

  3. Anonymous
    Unregistered
    Posted 8 years ago #

    A sample output of the url (what's in your address bar after you click the link) will help immensely in determining the problem.

  4. Anonymous
    Unregistered
    Posted 8 years ago #

    Hrm.... I was thinking of a way to fix this if I had what I asked for and now I don't remember. Anyways, try adding this to your C:\windows\system32\drivers\etc\hosts file (go to Start, Run, and type notepad C:\windows\system32\drivers\etc\hosts:

    Right after it says "localhost", click there then hit the spacebar once, and type your FQDN, linked.viper007bond.com, and try using it again (type http://linked.viper007bond.com into your browser instead of http://linked.viper007bond.com). I take it your permalinks work if you're not using your home PC to view the website?

  5. TechGnome
    Moderator
    Posted 8 years ago #

    I've *never* been able to get permalinks working on my Winders machine.... I just chalked it up to a fact of life and turn them off when working locally.

    Although, mark's solution sounds intriguing.... if any one tries it, let us know if it works.

    -tg

  6. mark, I think you're quite confused as to what we're talking about. I'm not talking about using my home PC to view my site and permalinks not working there. They work just fine:
    http://www.viper007bond.com/archives/2005/09/25/polish-toddler-runs-over-family-members/

    Permalinks don't work though on my local install of WordPress. I have Apache, PHP, and MySQL installed on my Windows machine for development purposes and permalinks don't work here.

    http://linked.viper007bond.com/local_phpinfo.htm is the phpinfo() results for my local install.

    @TechGnome: that's what I figured. No biggy though. It's not like the URL actually matters. :)

  7. Anonymous
    Unregistered
    Posted 8 years ago #

    Ah yes, that's probably it. Many people have mixed results with getting mod_rewrite to work properly or at all on Windows machines. If you don't have access to a linux server, you may want think about setting one up, either through VMWare ($$$) or ... (can't remember the name of a free Linux emulator for Windows). Or if you have some spare parts, you could spend some dough and put together a headless Linux server (I did this, definitely the way to go: http://laeb.dyndns.org:81).

  8. Cypher
    Member
    Posted 8 years ago #

    I use Linux as my primary machine, but sometimes I use a Windows machine.

    I finally decided that I would, regardless of how long it took, track down the issue and make it work. Mod_Rewrite should have no reason not to work in Windows, so I figured it was some flag..

    Well, I finally got it work.

    For starters. I'm running Apache 2 installed in "/program files/Apache Group/Apache2".

    Edit the file /conf/httpd.conf and enable mod_rewrite if it hasn't been by uncommenting the LoadModule rewrite_module modules/mod_rewrite.so and then most importantly go to the <DocumentRoot> definition and you will see a accompanying <Directory> defintion. Set the AllowOverride flag there to all using AllowOverride All.

    And bingo, I had pretty URL's working..

    Regards

  9. TechGnome
    Moderator
    Posted 8 years ago #

    No kidding? Hmm... Will have to give this a go... would make things easier when I grab copies of my DB.

    -tg

  10. admin101
    Member
    Posted 8 years ago #

    I'm having the same problem with my permalinks not being found while running in localhost mode.

    I tried what cypher suggested, but that did not help.
    rewrite is enabled.

  11. Cypher
    Member
    Posted 8 years ago #

    Make sure the AllowOverride for the directory where you have your wordpress located is set to All. Otherwise, your .htaccess file is ignored.

    Regards

  12. admin101
    Member
    Posted 8 years ago #

    AllowOverride for my root directory is set to All.

    Same problem!

  13. admin101
    Member
    Posted 8 years ago #

    Problem solved by doing the following:

    As suggested by Podz at his Tamba2 WebSite:

    In phpMyAdmin,under the SQL tab, instead of importing the database file by using the browse function in the lower window, I copied and pasted the database contents in the upper window.

    The Permalinks now work fine.

  14. Cypher
    Member
    Posted 8 years ago #

    Huh? What's the relation and corelation here. How does this allow or disallow the permalinks from working?

    I'm confused..

    Regards

  15. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I'm with you Cypher :)
    Must have been a combination of events with the other poster, but if everyone is happy, thats a good thing.

  16. Woo, got it working! :D It was an issue with AllowOverride. However, it wasn't in the DocumentRoot Directory settings that made it work. It was the global AllowOverride:

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride All

  17. functionjunkie
    Member
    Posted 8 years ago #

    Huzzah! This solved my problem too. Thanks Viper!

  18. moofius
    Member
    Posted 8 years ago #

    strongSolved my problem too, thanks :Dstrong

Topic Closed

This topic has been closed to new replies.

About this Topic