Forum Moderators: phranque

Message Too Old, No Replies

Urgent help with redirecting domain

         

greenone

6:12 am on Dec 12, 2006 (gmt 0)

10+ Year Member



Hello,

I need urgent help with my htaccess file. I have several domains, then I was adding 301 redirects on my .htaccess files, by mistake I uploaded the wrong htaccess file to the wrong domain. Now, when I go to that domain, it redirects me to the other domain, I can't revert the change eventhough I already re-uploaded the correct htaccess and tried deleting too! PLease Help!

I was going to add the following file to domain1:

RewriteEngine On
Options +FollowSymLinks

# redirect to preferred www domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\.domain1\.com
RewriteRule ^(.*) [domain1.com...] [R=301,L]

RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteCond %{REQUEST_FILENAME}!-l
RewriteRule .* index.php [QSA,L]

Then by mistake uploaded this one (from subdomain on domain2):

RewriteEngine On

# redirect to preferred non-www domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^subdomain\.domain2\.com
RewriteRule (.*) [subdomain.domain2.com...] [R=301,L]

Now when I go to domain1.com it always redirects to subdomain.domain2.com Please help!

What can I do?

Thanyou,

jdMorgan

6:44 am on Dec 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I can't revert the change eventhough I already re-uploaded the correct htaccess and tried deleting too! PLease Help!

Changes to your .htaccess file take effect instantly, unless you have a very weird hosting service that requires you to 'schedule' them. This is not likely.

So the first thing to try is to revert your .htaccess file to a correct version, and then flush your browser cache (Temporary Internet Files on IE) to avoid seeing a stale cached redirect.

You should always flush your cache after making *any* change to .htaccess or your server config file, if you want to see accurate, fresh test results.

Jim

greenone

8:59 am on Dec 12, 2006 (gmt 0)

10+ Year Member



Hi,

Ooopss, thankyou very much, it was my browser cache!

Now everything is ok, sorry for my dumb question...


Thanks again.