• [ Moderator note: moved to Fixing WordPress. ]

    I’m going to do huge changes to my website:
    – changing from html to wordpress php website
    – changing from http to https
    – changing all the urls of my website
    – Moreover I’ve seen that google is returning results for my website/page.html and http://www.mywebsite/page.html and I want to unify google search results between http://www.mywebsite and mywebsite (with or without www)

    and I need definitely some help for the htaccess not to loose my seo. I’m quite scared !!!!!….

    Right now, my html website has the following structure:
    index.html/ FOLDER/ and inside all my html files

    In the future, my WP website is going to have the following structure:
    index.php/WP-Folder/ and inside all my wordpress files
    This index.php at root will be:
    <?php
    header( ‘Location: /WP-Folder/’ );
    exit();
    ?>

    Inside WP-folder there is the htaccess created by wordpress and I suppose this is where I’m going to add all the changes I want to do for the redirect 301. Here is the code of this index.php right now:

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

    Can I add before the “# BEGIN WordPress” the following lines in order to do the several complex redirect 301 (from http to https ; from html to wordpress ; from old url to new one ; from www to non www )?

    Exemple for 2 pages:
    Redirect 301 http://www.mydomain.com/FOLDER/Page1.html https://mydomain.com/WP-Folder/NewPage/
    Redirect 301 http://www.mydomain.com/FOLDER/Page2.html https://mydomain.com/WP-Folder/iNewPage2/
    Redirect 301 http://mydomain.com/FOLDER/Page1.html https://mydomain.com/WP-Folder/NewPage/
    Redirect 301 http://mydomain.com/FOLDER/Page2.html https://mydomain.com/WP-Folder/iNewPage2/

    Thank you A LOT in advance for any help !
    I know it is a little bit complex but this is why I need help…
    Ana

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Lost in .htaccess : a lot of changes to do’ is closed to new replies.