• Resolved cattykool

    (@cattykool)


    Hello,

    I have my site set like this:

    root : index.php (which reads)

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

    Plus I have this .htacess file

    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName fethiye-guide.com
    AuthUserFile /home/fetty/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/fetty/public_html/_vti_pvt/service.grp
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    then in directory /blog
    I have the same index file and the same .htacess file

    I pasted the htaccess code from the permalinks page after selecting my format.

    When I now try to open my-website.com I get this message in my browser:

    The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    I guess this is to do with the mod_rewrites ?

    Does anyone know hoe to fix it ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Undo the changes you made from the paste. You didn’t need to do that. WordPress handles permalinks internally, your rewrite rules that you had already were fine.

    Thread Starter cattykool

    (@cattykool)

    BTW
    If I go direct to my-site.com/blog/index.php then it all works ok.

    But running it from root doesn’t work ??

    my-site == fethiye-guide

    thanks for any helpful guidance.

    Thread Starter cattykool

    (@cattykool)

    Do you mean that I should delete this:

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

    ??

    The reason I pasted it was becuase it sad something like
    “If we could update the .htaccess file …
    copy and paste the stuff below”

    so I did.

    Thread Starter cattykool

    (@cattykool)

    Well …

    I deleted that stuff and it now reads:

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName fethiye-guide.com
    AuthUserFile /home/fetty/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/fetty/public_html/_vti_pvt/service.grp

    and this htaccess file is in BOTH the root and in the blog directory.

    But I am still getting the same error.

    see : https://www.site.com

    site == fethiye-guide

    thanks for helping ??

    Thread Starter cattykool

    (@cattykool)

    OK fixed it ??

    1) I went back to my original htaccess
    2) Made the htaccess wrtable
    3) I changed my permalinks to something else

    Hope this helps some else as well !

    Yes… you should write permalinks using wordpress. It won’t make mistake! if you’re editing manually then you should be a geek in .htaccess files!

    Let me see if I’ve got this straight. If you are using the default permalinks you won’t have a .htaccess file in the root.

    As soon as you choose one of the other permalink options wordpress writes an .htaccess file. Am I right?

    @ncwalker

    You should have started a new thread. I wasn’t even going to read this one since it is marked as “resolved”. ??

    You probably won’t have a htaccess file at root. A htaccess file is an Apache config file that sets/changes the server’s config settings for the directory it resides in. When you opt to select “pretty permalinks” in WordPress, assuming the server has mod_rewrite enabled, (an Apache module that rewrites permalinks on the fly) WP will use the htaccess file in conjunction with mod_rewrite to create the permalinks. If the file does not exist, WordPress will create it.

    Further reading here.

    Yeah, having two copies of .htacess with the same content is the problem. You do not need to define rewrite rules twice.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I changed the .htaccess file and now my site doesn’t work :( Please help !’ is closed to new replies.