开发者

Redirecting to a new site unless in a specified directory

开发者 https://www.devze.com 2023-02-02 17:53 出处:网络
I run an image hosting site. Lets just go with the following inform开发者_如何学运维ation. Site: imagehosting.com

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

精彩评论

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