.htaccess not working

Web hosting discussion, programming, and shared and dedicated servers.
16 posts Page 1 of 2
by imdvibe » Mon Jun 06, 2011 2:23 pm
I am having a problem getting a redirect to work at all and I need your help. Here's what I'm trying to do:

the website I have and want to use is www.catvibe.com which has my wordpress site that sonic is hosting

the website I want to redirect is www.catvibe.net (want to point it to www.catvibe.com) which sonic is hosting as of today.

In my user folder (imdvibe) are four folders, catvibe.com, catvibe.net, ftp, site.

I put the .htaccess file into the catvibe.net folder (and deleted the index file that was there).

The .htaccess file currently reads this code (although I have already tried a few different versions)

Redirect 301 / http://catvibe.com/

no matter what I do it will not redirect, Please help!
by imdvibe » Tue Jun 07, 2011 3:42 am
In face I encounter this error message:
Not Found
The requested URL / was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
by tamino » Tue Jun 07, 2011 10:05 am
I'm not feeling very qualified here because I've never used a .htaccess file in my life! :-) But I googled for "htaccess redirect" and the second hit contained this example (edited to match your domain):

RewriteEngine on
RewriteRule (.*) http://www.catvibe.com/$1 [R=301,L]

In fact, I tried this in my own server (not hosted by Sonic) and it worked. That example will redirect things like http://www.catvibe.net/foo to http://www.catvibe.com/foo -- in other words it'll keep the stuff after the slash intact. Is that what you want? Or do you want it always to go to the main page of http://www.catvibe.com/ ?

If you want the latter, it sounds like you'd need:

RewriteEngine on
RewriteRule .* http://www.catvibe.com/ [R=301,L]

(in other words, the same thing, just without the parens on the left and the $1 on the right)

Again, I didn't try this on a Sonic-hosted domain, and it's possible that there's something different about Sonic's apache configuration than on mine. But it's worth a shot?
by imdvibe » Tue Jun 07, 2011 11:10 am
Tamino I really appreciate you jumping in, I wish Sonic would (SONIC PLEASE HELP!). I went to the article you posted and tried this code in various permutations, I even added back an index.html which the Sonic tech support guy suggested I delete. Nothing is working, the redirect isn't working and I"m still getting the same 404 and (URL not found on this server) message. It's as if the server isn't seeing the .htaccess file.
by tamino (at work, not logged in) » Tue Jun 07, 2011 11:24 am
Hmm. :-/

You could also try an index.html with the following in it (I really hope this html comes through...)

<html>
<head>
<title></title>
<meta http-equiv="Refresh" content="0;url=http://www.catvibe.com/" />
</head>
<body></body>
</html>

If you want to make sure you get a response from Sonic, I'd suggest giving them another call, honestly. My impression was the forums are more for users supporting each other.

Good luck!!
by imdvibe » Tue Jun 07, 2011 11:29 am
Yes I tried that html index too.

Was on the phone with Sonic yesterday for several hours, and I just wrote them another email. I was told by them yesterday that Sonic tech support guys with knowledge about these things do jump in and that this was the best way to solve the issue.
by tamino (at work, not logged in) » Tue Jun 07, 2011 11:31 am
Wait! Don't touch anything! I don't know how you have it set up right now, at this very moment, but it's working, however it is! I see the redirect.

If you are not seeing the redirect right now, I suggest clearing your browser cache, and quitting and restarting, maybe.
by imdvibe » Tue Jun 07, 2011 11:33 am
try it again, I just did a couple of things so let's see before I change again.
by williamt » Tue Jun 07, 2011 11:34 am
imdvibe wrote:In face I encounter this error message:
Not Found
The requested URL / was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
There was a hosting error on our end and dns for catvibe.net needed to be changed.
It's fixed now and I fixed your redirect which you had right the first time. :P

-William
Sr. Systems Administrator @ sonic.net
by imdvibe » Tue Jun 07, 2011 11:38 am
William, can you fix it again because I think I have messed it up again in between the fix.
16 posts Page 1 of 2

Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 22 guests