Redirecting to a new site unless in a specified directory
I run an image hosting site. Lets just go with the following inform开发者_如何学运维ation.
Site: imagehosting.com
Tiny: imgho.st
Directory: n/
Directory is where the images are stored. Anyways. I'm trying to figure out an apache rewrite method to redirect imgho.st to imagehosting.com UNLESS in the n/ directory. So unless the user is imgho.st/n/83md.png redirect to imagehosting.com.
Could anybody help me out with this?
Thanks!
You can put RewriteCond
before your RewriteRule
RewriteCond %{REQUEST_URI} !\/n\/.*$
RewriteRule ...
精彩评论