Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-19-2012, 04:04 AM   PM User | #1
user.name
New Coder

 
Join Date: Aug 2007
Location: Philippines
Posts: 26
Thanks: 9
Thanked 0 Times in 0 Posts
user.name is an unknown quantity at this point
htaccess 301 redirect everything except /admin

I have been scratching my head for almost half an hour already because of this. I don't know what I am doing wrong, might just be under my nose, but i just cant see it. Here's what I have on my
Code:
.htaccess
Code:
  RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

  RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  RewriteCond %{REQUEST_URI} !^/admin [NC]
  RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]
When I access
Code:
example.com/admin
i am still redirected to
Code:
newsite.com/admin
Can anyone please advise? Thanks!

I also tried this http://www.codingforums.com/showthread.php?t=72975 but to no avail
user.name is offline   Reply With Quote
Old 10-20-2012, 06:18 AM   PM User | #2
user.name
New Coder

 
Join Date: Aug 2007
Location: Philippines
Posts: 26
Thanks: 9
Thanked 0 Times in 0 Posts
user.name is an unknown quantity at this point
anyone?
user.name is offline   Reply With Quote
Reply

Bookmarks

Tags
301, htaccess, redirect

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:02 PM.


Advertisement
Log in to turn off these ads.