开发者

mod_rewrite: How to I permit a user with no redirection/rewriting

开发者 https://www.devze.com 2023-01-09 16:19 出处:网络
I\'m working with mod_rewrite for Windows (via an ISAPI filter) and haven\'t yet seen documentation on how to set up RewriteRule to permit the existing url with no changes.

I'm working with mod_rewrite for Windows (via an ISAPI filter) and haven't yet seen documentation on how to set up RewriteRule to permit the existing url with no changes.

RewriteCond %{HTTP_USER_AGENT} !.*iPhone.* [NC]
RewriteRule () http://DontWantToRedirect/orAlterURL [R,NC,L]

My goal is to create a rule to permit only iPhones with OS 4.0.1 to connect to my server. There are other rules in play here, so I have to keep the logic if - then - passthr开发者_如何学JAVAough w/no change


To not rewrite a URL with RewriteRule try just using a dash as the rewritten path...

RewriteRule ^.*$ - [NC,L]
0

精彩评论

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