301 redirect with .html pages

EzGenerator V4 forum

Return to “Ezgenerator v4 Customer Forum”

[You can only see part of this thread as you are not logged in to the forums]
7777777
Mon Mar 11, 2013 8:26 am

x

301 redirect with .html pages

Hi, miro, Atanas could you please help with the following situation:
there is some code in .htaccess file:

Options +SymLinksIfOwnerMatch
RewriteEngine On

RewriteCond %{HTTP_HOST} ^yoursite\.com\.ua$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com.ua/$1 [R=301,L]


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.yoursite.com.ua/ [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.yoursite.com.ua/ [R=301,L]


it need for redirect site link to link with 'www'
and if in the end of site link is 'index.php' or 'index.html' - it redirects to www.yoursite.com.ua

but it doesn't wotk with .html pages.
maybe there is need some other code?..

Atanas Angelov
Site Admin
Mon Mar 11, 2013 10:14 am

x

Re: 301 redirect with .html pages

Hi, Try this: Code: Select allRewriteCond %{RE...


Return to “Ezgenerator v4 Customer Forum”