开发者

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 ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜