.htaccess, permalinks, and my stress level all in one post! (4 posts)

  1. edeuinu
    Posted 7 years ago #


    I seem to be having an issue with my .htaccess file. I get random 500 errors, auto-log off, or just very slow loading times on my site, all the time.

    I discovered, if I delete/rename my .htaccess file, everything works except the permalinks. Homepage works, I can use the WP Backend, upload images, etc.

    I tried to do some digging in forums and such but no luck.
    I changed some of the settings as far as permalinks go but didn't see any change.

    Also, what I found curious, if the few others blogs I have setup (just not using that much) don't have an .htaccess file even in the root.

    Anyway, my stuff:
    site: http://theothercastle.com
    php: 4
    provider: 1&1
    wp: 2.7

    .htaccess contents

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

    # END WordPress

    Thanks for any help on this, I really appreciate it.

  2. WebDev WaxLotus LLC
    Posted 7 years ago #

    So much of this depends on your particular server environment that what works for me, may not work for you...

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    # Don't let anyone read this file
    <Files .htaccess>
    order deny,allow
    deny from all
    # 301 redirect www to non-www
    # There are more generic ways of doing this, I know...
    RewriteCond %{HTTP_HOST} ^www.mydomain.com [NC]
    RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301,NE]
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ /$1/ [R=301,L]
    # Just WP files, no evil garbage on URL's
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    #Allows me to use the ajaxy file uploader
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
  3. edeuinu
    Posted 7 years ago #

    I can try that, would you know why the other WP blogs I have setup on the same server did not create an .htaccess (and work fine) but this one did? I just made it 2 weeks ago.

    *edit* No luck on that one.

  4. f1f
    Posted 7 years ago #

    I'm in a similar position: using 1&1, get random 500 Errors, no idea why. Have just tried switching to default permalinks, deleting .htaccess and switxhing back to day & name permalinks. Now I don't have a .htaccess file but the site seems to work. Now I just have to wait and see if the 500 Errors come back.

    More on my problem here:


Topic Closed

This topic has been closed to new replies.

About this Topic