Mod Rewrite 301 redirect www.mysite.com to www.mysite.com/home.html

Status
Not open for further replies.

garycocs

New Member
Hi Lads,

Just wondering if you could help me out with this one, like I said above I have a client site where the client wants me to create a 301 redirect www.mysite.com to www.mysite.com/home.html for a Joomla based site.

I was trying the following:

Code:
RewriteCond %{HTTP_HOST} ^www.mysite.com$ [nc]
RewriteRule  ^(.*)$ http://www.mysite.com/home.html [R=301,L]

But that seems to be creating an error, it's looping back on itself.
 

php.allstar

New Member
any luck with this:

Code:
RewriteCond %{HTTP_HOST} ^www.mysite.com [nc]
RewriteRule  ^(.*)$ http://www.mysite.com/home.html [R=301,L]

RewriteCond %{HTTP_HOST} ^www.mysite.com$ [nc]
($ removed)

if not try:

Code:
RewriteCond %{HTTP_HOST} ^mysite.com [nc]
RewriteRule  ^(.*)$ http://www.mysite.com/home.html [R=301,L]

RewriteCond %{HTTP_HOST} ^www.mysite.com [nc]
(www. removed)
 

php.allstar

New Member
ok, sorry, i though you wanted absolutely everything to go to home.html!

try this:

Code:
RewriteCond %{HTTP_HOST} ^mysite.com [nc]
RewriteRule  ^(.*)$ http://www.mysite.com/[COLOR=Red][B]$1[/B][/COLOR] [R=301,L]
 

garycocs

New Member
Ya sorry I should have been more clear.

I have that one in already and that works fine for everything else but I still can't get mysite.com/ to go to mysite.com/home.html
 

garycocs

New Member
Ya I saw that in my googling all right, would that be in the cpanel? Sorry for my ignorance I have an idea what that is but not exactly!
 

garycocs

New Member
Can that be set up with a 301 redirect?

My problem now is that it's looking for the home.html file and won't pick with the joomla index.php file.

Hmmmm
 
Status
Not open for further replies.
Top