Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Help please

Status
Not open for further replies.
Joined
Mar 19, 2012
Posts
306
Reaction score
2
So I was trying to 301 redirect my website using htaccess form non www to www.

Some how I have managed to change my site to redirect to someone else site?

so if you type in example24help.com (my site)it now goes to examplehelp.com (not my site)!!

What have I done wrong?

if you type in www(dot)example24help.com it still goes to my site?

I have tried changing my htaccess using different codes eg:

"RewriteEngine On
### re-direct to www
RewriteCond %{http_host} !^www.*****.com [nc]
RewriteRule ^(.*)$ http://www.*****.com/$1 [r=301,nc]£

but nothing seems to work...
 
Try

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

I'm assuming multiple parked domains.
 
Hi Skinner thanks for the suggestion. I'm off the laptop and away to bed but I'll give it a shot tomorrow night. The domain wasn't parked it was a functioning site but I wanted to make sure all my backlinks where going to the right URL...

Should I past the code you have provided before after or instead of the original htaccess code which says something like Begin Wordpress....rewrite on...??


I think when I first did the redirect I stupidly missed the 24 out and redirected it it this other site but it won't let me change it back now.
 
Remove all the redirect code you added reverting to a blank wordpress one.

Add the above at bottom.

Not sure its needed tho as wordpress auto redirects based on the "Site Address (URL)", but maybe google need a 301 to update the code.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example24.com
RewriteRule (.*) http://www.example24.com/$1 [R=301,L]

is a single site redirect code.
 
Hi Skinner. I have tried both options
including this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example24.com
RewriteRule (.*) http://www.example24.com/$1 [R=301,L]

#
</IfModule>

# END WordPress


Still not working?

Regards,
Nova
 
Try this one, I've used this before and it's worked each time, I didn't add my domain name in to it, I just saved it as and uploaded it:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
 
Try this one, I've used this before and it's worked each time, I didn't add my domain name in to it, I just saved it as and uploaded it:

Thanks I'll give it a try. :)

So should my htaccess look like this?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#
</IfModule>

# END WordPress
 
Tried this

Thanks I'll give it a try. :)



# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#
</IfModule>

# END WordPress

and this

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

on its own but still no joy :(
 
Can you access your wordpress adminp panel ? I get the feeling the error is there.

Try simply copying your .htaccess then delete it if the redirect still happens its either wp or host control panel level redirect.
 
Last night I deleted the htaccess file and created a new one in notebook which I loaded on via FileZilla but still no joy.

Where should i look for a fix in Wordpress?

Cheers,
Nova
 
In wordpress admin there are 2 settings site address and blog address, under general make sure they are.right. I'm out at mo so cant check exact wording.

You can delete the .htaccess completely to test, id test in an incognito or anon tab to make sure cookies etc. are not an issue.
 
Hi Skinner,

I had a look at Wordpress and the site address seems fine in Wordpress address (URL) and site address (URL). I deleted the htaccess file completely and its still redirecting to the other site. I may have to raise a ticket with hostgator.
 
Sounds like redirect done from the host control panel, they are often called forwarders worth a look.
 
I just tried to open the site in Opera and it said too many redirects... couldn't load the site so I went back to my hostgator redirect panel and deleted the redirect. It was working perfect in Opera so I closed Firefox reopened it and deleted all the cookies etc and it seem to be working finr now! :)

Thanks for all the help guys very much appreciated and I feel so relieved now. :cs :t
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom