john1111
01-29-2010, 09:29 AM
Hello to everyone,
I am all new to this sorry in advance if I do not make sence.................
I had my sites mark up which was built in tables built in php and the php was redircted to the .html extensions of the live site thats been live for a while i did not want to change the urls.
I need to 301 redirect the .php to the .html I added the some code to the .htaccess file and it has 301 redirected the
1, non www. to the www.
2, index.html and index.php to /
And the php extensions to html are still working but no matter what i do i cant seem to 301 the .php to the .html
Site name being www domain co uk
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.co.uk [NC]
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.domain.co.uk/$1 [R=301,L]
# rewrite php extensions to html
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^([^/]*).html$ $1.php
I would be very very greatful for any help recivied, spend two days reading here and there and no luck yet.
Thank you.
I am all new to this sorry in advance if I do not make sence.................
I had my sites mark up which was built in tables built in php and the php was redircted to the .html extensions of the live site thats been live for a while i did not want to change the urls.
I need to 301 redirect the .php to the .html I added the some code to the .htaccess file and it has 301 redirected the
1, non www. to the www.
2, index.html and index.php to /
And the php extensions to html are still working but no matter what i do i cant seem to 301 the .php to the .html
Site name being www domain co uk
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.co.uk [NC]
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.domain.co.uk/$1 [R=301,L]
# rewrite php extensions to html
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^([^/]*).html$ $1.php
I would be very very greatful for any help recivied, spend two days reading here and there and no luck yet.
Thank you.