WordPress.org

Ready to get started?Download WordPress

Forums

permalinks, .htaccess, and broken everything! (25 posts)

  1. miriam_catira
    Member
    Posted 8 years ago #

    OK, this is ridiculous. I want the permalink to read /year/month/day. So I know that I have my .htaccess file correct according to eveerything I've read.

    Now I'm not getting any erros with the links themselves, rather, they load the URL just fine - but they don't update the page!! As in, click "previous" and the URL changes to yesterday's date, no problem. Picture, title, everything displayed in the browser stays exactly the same.

    And, if I ask it to link to the archives, it gives me a "Server Not Found" error!

    Using WordPress 2.0.2, here:

    # BEGIN WordPress
    RewriteBase /comic/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ./comic/index.php/%year%/%monthnum%/%day%/%postname%/ [L]
    # END WordPress

    Any ideas? ...It's getting reaaally frustrating.

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

    Do you have a link?
    It's easier to test things out by clicking on the actual problem.

  3. miriam_catira
    Member
    Posted 8 years ago #

    I would, but we've set everything back to the normal linking ( =?123 ) so the site was usable. everything works so long as we don't touch the link format. Imagine this: there's the calendar. You click "16". The URL changes to ../2006/April/16/post/ and the browser continues to display today's post.

  4. stephenju
    Member
    Posted 8 years ago #

    Those variables (%year%, etc) are WP permalink variables, not mod_rewrite ones. ie: Apache doesn't understand those.

    Did you write the rule yourself or use the permalink panel in WP admin?

  5. stewdio
    Member
    Posted 8 years ago #

    Make your .htaccess file writable (CHMOD 777)and then go back to the permlink settings and select your format.

    I beleive this will fix your problem, so long as your .htaccess is writable. WordPress will rewrite your file accordingly. Mine differs slightly:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    You will be able to note the changes in the files administration pages as mentioned.

    Once acheived, CHMOD your .htaccess back to 444

  6. miriam_catira
    Member
    Posted 8 years ago #

    As some posts have suggested I’ve tried: deleting my .htaccess, changing read/write permissions, I've hand writen the htaccess, let WP write it, playing with /%year%/%monthnum%/%day%/%postname%/, reinstalling wordpress, reinstalling the mysql DB, switching back to a default theme and changing my PHP. I must be missing something obvious. I changed it back so you can see it in action.
    http://angryteeth.net/comic/

  7. stephenju
    Member
    Posted 8 years ago #

    What is your WordPress address and Blog address in General Options admin panel and do you redirect /comic/ to /comic/nfblog/ by htaccess or other means?

  8. miriam_catira
    Member
    Posted 8 years ago #

    WordPress address (URI): /comic/nfblog
    Blog address (URI): /comic

    I just used the WordPress panel to change it. It seemed to work fine when I was using the ?p=123 option

  9. stephenju
    Member
    Posted 8 years ago #

    Do you have a /comic/index.php ? If so, what's in it?

  10. miriam_catira
    Member
    Posted 8 years ago #

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./nfblog/wp-blog-header.php');
    ?>

  11. stephenju
    Member
    Posted 8 years ago #

    That index.php looks right. Do you have a .htaccess in the nfblog directory? If so, rename or move it away and see if that's the cause.

  12. miriam_catira
    Member
    Posted 8 years ago #

    I only have .htaccess files in the www/ and www/comic/ directories and I've tried it with out the one in the www/

  13. joshray
    Member
    Posted 8 years ago #

    I have the same problem -- fresh install, change the permalink and, bam, everything is broken. Only when I delete .htaccess is the site even viewable, but permalinks remain broken. Do I need to somehow hack the basic install?

  14. marianiello
    Member
    Posted 8 years ago #

    I notice you're on Netfirms. I am also and have the same problem. It seems to be the way the host has configured Apache conflicts (or doesn't work) with the way WP 2.x utilizes permalinks. I been searching everywhere and found no solution. Although netfirms states that they support this feature, i don't think they actually do.

    Their site suggests placing index.php before the permalink variables, which seems odd. But if you do that it will actually work correctly.

    http://support.netfirms.com/idx.php/57/669/Netfirms-WordPress/article/How-do-I-create-search-engine-safe-URLs-in-Wordpress.html

  15. joshray
    Member
    Posted 8 years ago #

    I'm using Host My Site and the index trick didn't work for me =(

  16. joshray
    Member
    Posted 8 years ago #

    Here's what my service provider says:

    <b>That error is because we don't allow RewriteRules in individual .htaccess files. When you change your permalinks, WordPress tries to add RewriteRules to your .htaccess file, which in turn gives an error since we don't allow that.

    We can add these rules to your server configuration file. All we'd need is a copy of the RewriteRules, which I believe your should be able to get from WordPress. Once we have those rules, we'll add them to your site and you shouldn't get the error anymore.
    </b>

    Anyone know what the RewriteRules are? I can't seem to locate them in WordPress...

  17. watchingtheparade
    Member
    Posted 8 years ago #

    I am a total newbie who hasn't had much time to figure out what is going on, but today I tried to change the permalinks as joshray was trying to do. I am also now locked out of the blog pages.

    Can I fix this and get back to default just by deleting the .htaccess file? Or, do I have to have the host do something with it? I don't want to mess anything up further, at this point I just want to have it up again.

  18. Samuel B
    moderator
    Posted 8 years ago #

    "Anyone know what the RewriteRules are? I can't seem to locate them in WordPress..."

    When you go to the admin permalink page, the rewrite rules are generated at the bottom of the screen when you make a change - it's what is actually in your .htaccess file. Copy and paste from either place into Notepad and give to your host.

    "Can I fix this and get back to default just by deleting the .htaccess file?"
    You can delete it without problems - well except permalinks - you need it for those. Set permalinks up again when you get back in.

  19. watchingtheparade
    Member
    Posted 8 years ago #

    When I delete it everything will be back the way it was? Will permalinks revert back to default?

  20. joshray
    Member
    Posted 8 years ago #

    It doesn't go back to the way it was for me.

    Samboll, thanks for the tip! However, the instant I hit "update" I get the error message and everything breaks, so I'm not able to see the Rules.

    Could someone give them to me? I'm looking for year/post name.

  21. watchingtheparade
    Member
    Posted 8 years ago #

    I contacted my host. They do not allow the changing of permalinks because it requires externally editing of the .htaccess file. Seems that is all the will not allow, so I won't touch that button again (at least not with that host).

    He deleted the .htaccess file, and as far as I can tell to this point, everything seems to be as it was on the blog pages of our site. The other pages were not affected.

    As a precaution I backed-up everything before he deleted the .htaccess file. It appeared that nothing else had changed, because none of the other files had a changed modification date.

    He said it will create a new .htaccess file automatically.

    Thanks for the help everyone.

    I'm sure I'll be back with more questions later.

  22. joshray
    Member
    Posted 8 years ago #

    So I can't get the rewrite rules because this bug keeps me out.

    Could someone post the rewrite rules?

  23. joshray
    Member
    Posted 8 years ago #

    Can someone help please? This simple bug is so annoying, I'm ready to do myself in...

    Here's my problem again: When I change the permalinks, .htaccess is changed. But my host has .htaccess protected, so when I change permalinks, it shuts my whole site down.

    In order for .htaccess to be changed, my host needs the RewriteRules so they can put them in. The RewriteRules are generated in the .htaccess file when permalinks are changed, but since everything shuts down, I can't see what the RewriteRules are to give to my host. Catch-22.

    Can someone please, please give me the RewriteRules so my site works? Thanks!

  24. Chris_K
    Member
    Posted 8 years ago #

    Suppose you made your .htaccess NOT writable. Then, when you go to the Permalinks page, WP will detect that it won't be able to change that file and will instead show you what the changes need to be. Copy/paste those from the page and send 'em to your host.

    Make sense?

  25. joshray
    Member
    Posted 8 years ago #

    Thanks, Handy, but as I understand it, .htaccess already isn't writable, that's what's causing all the problems.

    Actually, there isn't even an .htaccess file in the folder to begin with until WP generates one and then it gets all fubar...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags