WordPress.org

Ready to get started?Download WordPress

Forums

mod_rewrite problem (my host is oneandone.co.uk) (39 posts)

  1. jimhobbs
    Member
    Posted 9 years ago #

    Hi there

    I installed WP 1.5 last week for the first time and was impressed with how easily it all installed itstelf. I didn't run into any real problems until I started to play around with the permalinks

    My blog address is:
    http://www.jimhobbs.com/blog/

    I emailled my host - http://www.oneandone.co.uk - and asked them :

    > Can you tell me if my server supports the
    > Apache mod_rewrite module

    They replied : "Yes, the package does support mod rewrite"

    I ran the phpinfo file over at:
    http://www.jimhobbs.com/blog/info.php

    but can't find mod_rewrite on there?
    Any ideas how I enable it or turn it on?

    The permalinks I would like is just the standard:
    /%year%/%monthnum%/%day%/%postname%/

    What am I doing wrong - I just get 404 errors when I click on the blog entry title. If I remove the option for fancy permalinks the blog works fine, but I would like to have the same structure as above. What further info would you need from myself to help me fix this ?

    Many thanks
    Jim
    http://www.jimhobbs.com/blog/

  2. jimhobbs
    Member
    Posted 9 years ago #

    btw, I've read and worked through

    http://codex.wordpress.org/Using_Permalinks

    But at the bottom of the page, on point 3:

    "
    Fixing (.htaccess) Generation Issues
    If your installation of WordPress does not generate a .htaccess file or if it does not write the new rules onto your existing .htaccess file then there are a couple reasons that could be causing this. Work step by step and continue to the next step only if the step below does not work.

    Your server may not have the AllowOverride directive enabled. If the AllowOverride directive is set to None in your Apache httpd.config file, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem. When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files. Example of enabled AllowOverride directive in httpd.config:
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    If you don't want to set AllowOverride to all (as it is above) then your AllowOverride list must include the FileInfo directive. You must restart your Apache server for any httpd.config file changes to take effect. For more information on which overrides are allowed, read about Apache Core Features (http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride).
    "

    where can I find the httpd.config file ?
    how can I restart my Apache server?

    I do already have a .htacces file generated, after following steps 1+2... is step 3 necessary?

    Still can't get my permalinks to work

  3. jennmiller
    Member
    Posted 9 years ago #

    See if this post helps: http://wordpress.org/support/topic.php?id=26666

    I'm on 1&1.com, so I imagine we should be similar.

  4. ifelse
    Member
    Posted 9 years ago #

    BTW, I'm on 1and1.co.uk and can verify that mod_rewrite is on.

  5. jimhobbs
    Member
    Posted 9 years ago #

    Thanks for the reponses guys

    [b]ifelse[/b]
    you wrote:
    >>BTW, I'm on 1and1.co.uk and can verify that mod_rewrite is on.

    Do you mean
    - You can verify that mod_rewrite is switched on with *my* account
    or
    - You can verify that mod_rewrite is switched on in general with a oneandone.co.uk account?

    [b]jennmiller[/b]
    I checked out out the thread you pointed to (26666) and tried out the two suggestions in there

    "
    This worked for me just a couple of days ago using 1.5. I made a blank file in Notepad and named it .htaccess with no extension or anything like that. I ftp'd it to my root and that alone fixed everything. I hope this simple solution works for you
    "

    This didn't seem to do anything

    and likewise the following didn't seem to work

    "Login to your server via FTP and get to spot where you can see the .htaccess file. Then, open your browser and go to Options/Permalinks. Now, delete the .htaccess file. After that, recreate your permalink rules. A working .htaccess file should have been created in place of the old/deleted one."

    What should the CHMOD be for .htaccess.... 666 or 766

    I'm totally stumped and find it hard to figure where I'm going wrong given my very limited knowledge

  6. ifelse
    Member
    Posted 9 years ago #

    Do you mean
    - You can verify that mod_rewrite is switched on with *my* account
    or
    - You can verify that mod_rewrite is switched on in general with a oneandone.co.uk account?

    I meant that as mod_rewrite is turned on with my account, and because I did no special configuration, it strongly suggests that it would be the case in general.

    Giving the file 755 should be sufficient.

  7. jimhobbs
    Member
    Posted 9 years ago #

    ifelse :

    Wouldn't the phpinfo file thing I ran tell me ?

    http://www.jimhobbs.com/blog/info.php

    I cannot see mod_rewrite on that page?
    (should it show up if it is enabled?)

  8. ColdForged
    Member
    Posted 9 years ago #

    mod_rewrite existence doesn't show up in phpinfo().

  9. jimhobbs
    Member
    Posted 9 years ago #

    So I guess I am to assume by default it should be switched on with my oneandone.co.uk account

    If that isn't the problem - I'm still unsure why the fancy permalinks aren't working for me

  10. ifelse
    Member
    Posted 9 years ago #

    I don't believe that phpinfo(); displays the status of mod_rewrite (at least it doesn't in my setup where it is turned on).

    BTW, after you resolve things, it'll be a good idea to remove or at least protect files with phpinfo calls as it gives away a significant amount of info.

    When you get WP to recreate the .htaccess file from scratch, does it get created and written with access rules?

  11. jimhobbs
    Member
    Posted 9 years ago #

    If I delete the .htaccess file currently in my blog directory (using WS_FTP PRo program), and then go to:

    Options > Permalinks

    and then I put the following into the top box for Structure:

    /%year%/%monthnum%/%day%/%postname%/

    and then I click the 'Update Permalink Structure' button at the bottom

    It shows up in WS_FTP Pro as a new .htaccess file

    I check the CHMOD for this new file .htaccess file and it is 644

    So then I change this CHMOD to 755

    but the links are still not working?
    getting a 404 error still when I click on :

    http://www.jimhobbs.com/blog/2005/03/28/test2/

  12. ColdForged
    Member
    Posted 9 years ago #

    Can you make a copy of the .htacess file named "htaccess.txt" and put it in your blog root so we can see the generated rules?

  13. jimhobbs
    Member
    Posted 9 years ago #

    http://www.jimhobbs.com/blog/htaccess.txt

    (btw thanks for the help guys ... really appreciate it)

  14. ColdForged
    Member
    Posted 9 years ago #

    The rules look okay, and the URL as it would be rewritten into a query string (http://www.jimhobbs.com/blog/index.php?year=2005&month=03&day=28&name=test2&page=) works fine when loaded directly. This makes me think the rewrite rules aren't happening. Tell you what, you have FTP access, right? Go into your administration interface, manage files, and edit the .htaccess. Right after the RewriteBase line just enter some garbage...

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    lijlsijglijlsijegli

    Then try to load a page. If you get a 500 Internal Server Error, the mod_rewrite is active, otherwise it ain't. If it is, use FTP to delete that .htaccess and write out another one using WordPress. If it isn't active, we'll figure that out when we get there.

  15. jimhobbs
    Member
    Posted 9 years ago #

    I went into the admin poart of WP

    then Manage > Files

    and then typed in .htaccess at the bottom of the page to load the .htaccess file

    Then I added the line you suggested
    lijlsijglijlsijegli
    to the file and then clicked on the update button

    Straight away I got the 500 error in the admin area itself?

    error 500: Internal Server Error

    The server encountered an unexpected condition which prevented it from fulfilling the request.

    However the URL:
    http://www.jimhobbs.com/blog/
    loads up fine

    but when I try the entry link:
    http://www.jimhobbs.com/blog/2005/03/28/test3/
    it responds differently to before... it now

    before I was getting a 404 error

    now I get 500

    interesting.....

  16. ColdForged
    Member
    Posted 9 years ago #

    Well, if you put the line where I suggested, I believe that indicates the rewrite rules are active (yes, I expected the admin to misbehave). Note that I get a 500 on loading your base blog URL which I would expect. Go ahead and delete that .htaccess file from your FTP program so you can get back in.

    I'm at a loss at this point.

  17. jimhobbs
    Member
    Posted 9 years ago #

    thanks for the help & your time ColdForged

    I've now deleted the .htaccess file using the WS_FTP Pro and it now lets me back into the admin and lets me view the blog

    I'm just wondering if this might have something to do with the .htaccess file that I have when I log into the absolute root of my oneandone.co.uk account

    The .htaccess file there is just a single line long as follows:

    ErrorDocument 404 http://www.thewonderwall.com/404.php

    When the blog can't find the permalink entry, it re-directs to the 404 page on thewonderwall.com (which is another site I run, and ultimately where I hope to install another version of WP once I have the install sussed for jimhobbs.com)

    I notice in the blog directory on WS_FTP there are no content files in the directory following blog/

    ie.
    http://www.jimhobbs.com/blog/2005/03/28/test3/

    Should I be able to see these folders when I log into the FTP program? Because it hasn't created any? (or is all the content stored away somewhere else?)

  18. ColdForged
    Member
    Posted 9 years ago #

    No, that's the point of the mod_rewrite. When Apache sees that URL and uses the rewrite rules correctly it will "rewrite" the URL into a format like I posted above with the query string. That's what WordPress eventually sees, so the whole hierarchy is virtual, it doesn't exist on the file system.

  19. jimhobbs
    Member
    Posted 9 years ago #

    ah... fair dos...

    does anyone else have an idea why my permalinks still won't work ?

  20. graybo
    Member
    Posted 9 years ago #

    hi jimhobbs.

    I can't help but just wanted to say that you're not alone. I'm on 34sp.com and seem to have similar problems.

    Incidentally, which version of WP are you using. I have been using WP1.5 but found that another (unrelated) problem I had was solved by using elements of a more recent nightly. Have you tried using the latest nightly? I know from reading these forums and my own experience that 1.5 is not without problems and that there is talk of a revision to deal with some issues.

  21. jimhobbs
    Member
    Posted 9 years ago #

    thanks for the reply graybo.
    I am using WP1.5
    It seems I am not alone in having difficulties configuring the permalinks / mod_rewrite / .htaccess

    I will take a look at the nightly updates....

  22. jimhobbs
    Member
    Posted 9 years ago #

    I've managed to break my blog ... now I can't even access the admin panel?

    I changed the URI on the two options from:
    http://www.jimhobbs.com/blog/

    to something like:
    /homepages/34/d76786660/htdocs/jim_hobbs/blog

    just to see if this would work... and now I can't access the admin section to change it back :(

    help !

    maybe it would be better if I deleted everything and started again.... ?

  23. aggrrssive
    Member
    Posted 9 years ago #

    Exact same problem here. I verified that my .htaccess file is writeable. Whenever WordPress writes to the file, my site crashes. I also checked out similar posts like http://wordpress.org/support/topic.php?id=29799 and have not found an answer.
    For me, this is more than a "looking pretty" issue. Pages with a permanent URL (ie: no querystring) are able to be spidered by many more search engines.
    BTW, other than this issue, I love WordPress. It's the easiest blog plugin I've ever seen.

  24. grendelquinn
    Member
    Posted 9 years ago #

    jimhobbes, the instructions at http://wordpress.org/support/topic.php?id=30336 may help you reset your siteurl.

    But I'm stuck in the same boat as you and still haven't yet found a way to get my permalinks OR my default functions to include index.php? in the argument (which works if I add it manually to the default links). My contact at my server host (network solutions) says they have no blogging software in use by their users and are checking the WP requirements to make certain mod_rewrite is active.

  25. jimhobbs
    Member
    Posted 9 years ago #

    grendelquinn -- thank you for the link. It enabled me to get into the database and change address so I can now access the admin panel. Much appreciated !

  26. divrom
    Member
    Posted 9 years ago #

    Have u tried starting again from scratch? Or, at least deleting your current .htaccess and choosing an alternative permalink strucutre from the admin page.

  27. jimhobbs
    Member
    Posted 9 years ago #

    Haven't tried starting from scratch. maybe that is my next option.

    I have tried deleting my current .htaccess file and also I've tried choosing an alternative permalink structure

  28. banzona
    Member
    Posted 9 years ago #

    I built three environment. All the same problem. Does this product really works?

  29. lawtai
    Member
    Posted 9 years ago #

    Banzona, no need for you to go into multiple threads and ask if WP really works. Yes it does work. Problems that may cause it not to work depend on your server settings, and not wordpress itself.

  30. James
    Happiness Engineer
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.