WordPress.org

Ready to get started?Download WordPress

Forums

site down after .htaccess being created (6 posts)

  1. dtl
    Member
    Posted 9 years ago #

    hi,

    everything and every thing in part worked fine with until today with WP 1.5. I just have finished today with building the site with WP and noticed someting strange. At logout, WP creates a .htaccess file. After creating this file, all the posts/pages/links created are not working anymore, Firefox/IE returning Page unavailable. Here I am, going to Manage Pages, editing pages, each one by one, publishing them, everything coming to normal, pages are displayed ok. I log out, htaccess is being created, site is down, with the exception of the homepage. Now it is working because I have submitted again the pages and not being logged out.
    Thing noted: I don't think I have seen the htaccess being created until today, but I am not sure about this.

    thanks,
    Alex

    Here is the link to my website http://blogs.flavorade.com/wp
    and here is the htaccess

    ----

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp/
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [S=75]
    RewriteRule ^(about)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(about)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(about)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(about)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(about)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(brief)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(brief)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(brief)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(brief)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(brief)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(venues)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(venues)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(venues)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(venues)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(venues)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(cd)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(cd)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(cd)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(cd)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(cd)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(contact)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(contact)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(contact)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(contact)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(contact)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(download)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(download)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(download)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(download)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(download)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(members)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(members)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(members)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(members)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(members)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^(event)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(event)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^(event)/page/?([0-9]{1,})/?$ /wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^(event)/?([0-9]+)?/?$ /wp/index.php?pagename=$1&page=$2 [QSA,L]
    RewriteRule ^(event)/trackback/?$ /wp/index.php?pagename=$1&tb=1 [QSA,L]
    RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1 [QSA,L]
    RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1 [QSA,L]
    RewriteRule ^page/?([0-9]{1,})/?$ /wp/index.php?&paged=$1 [QSA,L]
    RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1&withcomments=1 [QSA,L]
    RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?&feed=$1&withcomments=1 [QSA,L]
    RewriteRule ^comments/page/?([0-9]{1,})/?$ /wp/index.php?&paged=$1 [QSA,L]
    RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /wp/index.php?s=$1&paged=$2 [QSA,L]
    RewriteRule ^search/(.+)/?$ /wp/index.php?s=$1 [QSA,L]
    RewriteRule ^category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /wp/index.php?category_name=$1&paged=$2 [QSA,L]
    RewriteRule ^category/(.+)/?$ /wp/index.php?category_name=$1 [QSA,L]
    RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?author_name=$1&feed=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?author_name=$1&feed=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /wp/index.php?author_name=$1&paged=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/?$ /wp/index.php?author_name=$1 [QSA,L]
    RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&feed=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&feed=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&paged=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/?$ /wp/index.php?year=$1 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /wp/index.php?year=$1&monthnum=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /wp/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&name=$4&paged=$5 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /wp/index.php?year=$1&monthnum=$2&day=$3&name=$4&tb=1 [QSA,L]
    </IfModule>

    # END WordPress

  2. katieinshoes
    Member
    Posted 9 years ago #

    I have the same problem!

    It seems that this part is what screws things up for me:

    <IfModule mod_rewrite.c>

    When wordpress rewrites my htaccess file, it adds those in, and then nothing within that folder is reachable. I'm guessing the server just doesn't understand what those parts mean, so it screws up. If I manually delete that out (and the corresponding closing tags), everything is fine again.

    Before, I used to remove the line in wp-admin/options-permalinks.php that saves the rewritten rules so that WP would just leave the file alone. Now that I'm adding pages and need the rewrite rules to be rewritten as I add pages, this isn't going to work anymore.

    I really don't know much PHP. Could anyone suggest a way to get WP to *not* add in the "<IfModule mod_rewrite.c>" line (the "# BEGIN WordPress" line is fine) on rewrites for those of us with cranky servers?

  3. Ming
    Member
    Posted 9 years ago #

    This is kind of a work around but it might fix your problems in the short-term. It's a plugin designed to use a different method of rewrite rules. But being a plugin it's easy to edit out the <IfModule... lines>.

    http://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/

    Hey dtl, does removing the <IfModule mod_rewrite.c> and </IfModule> lines make your .htaccess work?

  4. katieinshoes
    Member
    Posted 9 years ago #

    Ming: Thanks.

    I tried that plugin and I get a bizarro T_VARIABLE error on all my pages when it's activated. I tried editing the plugin several different ways and still got the error. Go figure.

    Any other ideas?

  5. katieinshoes
    Member
    Posted 9 years ago #

    Actually, nevermind (I think, I hope!). I looked at the code the plugin author had in his earlier post (http://boren.nu/archives/2004/10/08/alternative-rewrite-rules/) and tried replacing all the rewrite rules in my .htaccess with that. It worked! Beautifully!

    Now I'll need to edit out where the rewrite rules are rewritten in both in the permalink option and I think also the page entry files so the nice, short version doesn't get rewritten. Thanks for pointing me in the right direction.

  6. Ming
    Member
    Posted 9 years ago #

    Yeah that Boren is a smart guy. Definitely good work fixing it for your situation.

    Rather than editing WP, if you don't want your .htaccess overwritten may I suggest making the file unwritable? hehe... ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.