hrolsons
asked on
.htaccess file exclusion
I have an .htaccess file that is working great:
RedirectMatch 301 (.*)\.html$ http://newsite.com
How could I exclude the directory "http://newsite.com/Intranet/" from the redirect?
ASKER
@Gary, do I put those 2 lines after my line OR instead of my line?
Instead of (I just made an amendment to it before you posted)
ASKER
Doesn't seem to be working. For instance, http://originalsite.com does not redirect and http://originalsite.com/Intranet/ does redirect to http://newsite.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Same exact results. I wonder what's up?
I tried it locally and it works fine.
Give me some test url's
Give me some test url's
Can you post your htaccess as you have it now.
ASKER
#RewriteEngine on
#RewriteCond %{REQUEST_URI} !^/CRM [NC]
#RedirectMatch 301 (.*)\.html$ http://originalsite.com
#RewriteCond %{REQUEST_URI} !^/ebay [NC]
#RewriteRule .* http://originalsite.com/ [R=301,L]
#RewriteCond %{REQUEST_URI} !^/Intranet/ [OR]
#RewriteCond %{REQUEST_URI} ^.html
#RewriteRule (.*) http://originalsite.com/ [L,R=301]
RewriteCond %{REQUEST_URI} !^/Intranet
RewriteCond %{REQUEST_FILENAME} .*\.html$
RewriteRule . http://originalsite.com [L]
#RewriteCond %{REQUEST_URI} !^/CRM [NC]
#RedirectMatch 301 (.*)\.html$ http://originalsite.com
#RewriteCond %{REQUEST_URI} !^/ebay [NC]
#RewriteRule .* http://originalsite.com/ [R=301,L]
#RewriteCond %{REQUEST_URI} !^/Intranet/ [OR]
#RewriteCond %{REQUEST_URI} ^.html
#RewriteRule (.*) http://originalsite.com/ [L,R=301]
RewriteCond %{REQUEST_URI} !^/Intranet
RewriteCond %{REQUEST_FILENAME} .*\.html$
RewriteRule . http://originalsite.com [L]
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, now we're moving in the right direction. Same problem as original though, when I go to the original site, such as :
http://www.originalsite.com/Intranet
It goes to blueappleproperties.com. I did make sure the "I" was capitalized.
http://www.originalsite.com/Intranet
It goes to blueappleproperties.com. I did make sure the "I" was capitalized.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window