Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sueme

    (@sueme)

    Resshanney,

    Brilliant. Does exactly what I wanted. Thank you very very much

    Sueme

    Thread Starter sueme

    (@sueme)

    OK Sorted.

    Putting the new code under the existing code doesn’t appear to work, but putting the new code at the top does work.

    Presumably it diverts index.html to index.php first, then activates the rest of the code.

    The full code that works is:

    RewriteCond %{THE_REQUEST} ^.*/index.html
    RewriteRule ^(.*)index.html$ https://mysite.com/$1 [R=301,L]
    
    # 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
    Thread Starter sueme

    (@sueme)

    More info:

    My existing .htaccess 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 did a Google search, and it looks as though I may be able to add the following to the .htaccess:

    Options +FollowSymLinks
    RewriteCond %{THE_REQUEST} ^.*/index.html
    RewriteRule ^(.*)index.html$ https://www.yoursite.com/$1 [R=301,L]

    However, I’m not fully sure how to do this and don’t want to screw things up.

    Where exactly do I add the second bit of code to the first bit?

    Can anyone tell me please?

    Thread Starter sueme

    (@sueme)

    RVoodoo,

    Works a treat.

    Thank You Very, Very much.

    SueMe

    Thread Starter sueme

    (@sueme)

    Thanks Webjunk,

    I don’t mind getting more in depth with the code (Just bought, but not yet read, CSS The Missing Manual).

    Just need pointing in the right direction please.

Viewing 5 replies - 1 through 5 (of 5 total)