Forum Moderators: phranque

Message Too Old, No Replies

301 redirect problem

         

SEOPutte

2:24 pm on Nov 20, 2005 (gmt 0)

10+ Year Member



I have moved my site to a new domain and i will do a 301 redirect from the old domain to the new one.

I´ve put this in my .htaccess file:

RedirectMatch 301 ^(.*)$ [newdomain.com...]

But i still want to keep and access a catalouge on the old domain. www.oldomain.com/admin/

How do i solve this in the .htaccess?
Help would be much appreciated!

jdMorgan

5:20 pm on Nov 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to use mod_rewrite, and using the RewriteCond directive, add a condition so that /admin/ requests are not redirected.

That's a major advantage of mod_rewrite -- The ability to construct complex conditional clauses for rewrites and redirects.

Jim

SEOPutte

6:35 pm on Nov 20, 2005 (gmt 0)

10+ Year Member



hmm ok..not very good at these things..what syntax should i use to accomplish that with RewriteCond directive?

jdMorgan

7:26 pm on Nov 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Put

RewriteCond %{REQUEST_URI} !^/admin/

ahead of your RewriteRule that implements the redirect.

Jim

SEOPutte

8:39 pm on Nov 20, 2005 (gmt 0)

10+ Year Member



Thanks man!