Forums

Conflicting .htaccess files? (3 posts)

  1. herzberglarry
    Member
    Posted 4 months ago #

    I'm having a problem with URL redirects that the techies at Godaddy.com tell me is probably due to conflicting .htaccess files. I have two such files, one in my root directory at larryherzberg.com, and another in my WordPress directory, which is in my root directory.

    The .htacess file in my root directory reads as follows; it's supposed to redirect requests for (for instance) "larryherzberg.com/wordpress/" to "blogherenow.net"; there are three variations on the domains or paths, with and without the www prefix-

    rewriteengine on
    rewritecond %{HTTP_HOST} ^www.larryherzberg.com$ [OR]
    rewritecond %{HTTP_HOST} ^larryherzberg.com$
    rewriterule ^wordpress$ "http\:\/\/blogherenow\.net" [R=301,L] #4f0333871824d
    rewritecond %{HTTP_HOST} ^www.larryherzberg.name$ [OR]
    rewritecond %{HTTP_HOST} ^larryherzberg.name$
    rewriterule ^wordpress$ "http\:\/\/blogherenow\.net" [R=301,L] #4f0333052d441
    rewritecond %{HTTP_HOST} ^www.blogherenow.com$ [OR]
    rewritecond %{HTTP_HOST} ^blogherenow.com$
    rewriterule ^wordpress\/ "http\:\/\/blogherenow\.net\/" [R=301,L] #4f0333e18af5b

    The .htaccess folder in my WordPress directory reads as follows-

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

    I don't see how these two files could conflict (the second is just handling permalinks, right?), but when I go to "larryherzberg.com/wordpress/" in my browser (you can try this at home, kids), although I'm redirected to blogherenow.net, I also get a 404 error. Firefox has the /wordpress/ directory grayed out, indicating (I guess) that it's this directory that's not found. But it must be found, since the 404 error handler text file is inside it!

    Ideally, I'd like to redirect all requests for larryherzberg.com/wordpress/pathname... to blogherenow.net/pathname... (where the pathnames are identical), but I'd be willing to settle for redirections without 404 errors.

    Can anyone help me? Please?

  2. MickeyRoush
    Member
    Posted 4 months ago #

    I believe your first set of rules has a few syntax errors. Nothing needs to be escaped in the target of a RewriteRule. Also, this slash "/" doesn't need to be escaped.

    For you first set of rules, just try this:

    RewriteEngine On
    RewriteRule /wordpress/ http://blogherenow.net/$1 [R=301,L]

    Also for the second .htaccess (WordPress permalinks rules) you could try adding the directory name of where blogherenow.net is after RewriteBase. So if blogherenow.net is in a directory named "blog". You would put it like this:

    RewriteBase /blog/

  3. herzberglarry
    Member
    Posted 4 months ago #

    Thanks for the suggestion Mickey. I tried it, but it didn't help.

    I I think I'll just go back to the old larryherzberg.com/wordpress way of addressing blog pages, at least until someone can tell me what the problem is.

    Any other suggestions?

Reply

You must log in to post.

About this Topic