WordPress.org

Ready to get started?Download WordPress

Forums

WordPress migration and redirect loops (6 posts)

  1. marketappeal
    Member
    Posted 4 years ago #

    I've just copied my WordPress site's index.php and .htaccess to the root of my domain from /blog/ so that it will appear in the root, while the files stay in a folder.

    The problem is that I've tried to create page called /blog for my posts to appear on, but it's not working as I get a redirect loop instead.

    The .htaccess file of the root currently reads:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4
    </IfModule>
    
    Redirect /Search-Engine-Optimisation-Consultant-CV-SEO-SEM-PPC-Analytics.htm/ http://seocv.co.uk/seocv.html
    
    Redirect /Search-Engine-Optimisation-Consultant-CV-SEO-SEM-PPC-Analytics.htm http://seocv.co.uk/seocv.html
    
    Redirect /blog/copy-of-the-proposed-congress-banking-bailout-bill/ http://www.marketappeal.co.uk/index.php
    Redirect /blog/links-information-straight-from-the-source-1549/ http://www.marketappeal.co.uk/index.php
    Redirect /blog/website-design-competition-prize-100-commercial-property-website/ http://www.marketappeal.co.uk/index.php
    Redirect /) http://www.marketappeal.co.uk/blog/index.php
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    That's clearly a mess, which bit's don't I need please?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

  3. marketappeal
    Member
    Posted 4 years ago #

    Yes, as far as I can tell.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Try replacing:

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

    with just:

    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

    at the top of the file. Not sure what all of your Redirects are for but you really need to define these as either 301 (permanent) or 302 (temporary).

  5. marketappeal
    Member
    Posted 4 years ago #

    Hmm, I just tried that, still no joy. I also tried it without a .htaccess file, which didn't work either. :-(

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    Try putting everything back the way it was before you began moving files and then work through the steps in http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Topic Closed

This topic has been closed to new replies.

About this Topic