开发者

.htaccess : if is an path, do nothing, else, do the rewriterule

开发者 https://www.devze.com 2023-01-22 07:53 出处:网络
I have a little question very simple this time I think... How Have I to write my htaccess to do this instructions :

I have a little question very simple this time I think... How Have I to write my htaccess to do this instructions :

IF IS "/uploads" PATH INTO MY REQUEST, NOT REDIRECT AT ALL, JUST DO THE REGULAR REQUEST ELSE DO THE REWRITERULE : RewriteRule (.*) http://theDestinationDomain.com/$1 [P,L]

I Have tested that :

RewriteEngine on
RewriteC开发者_如何学编程ond %{REQUST_URI} !^/uploads/(.*)
RewriteCond %{HTTP_HOST} theDomainThatWillBeRedirect.com
RewriteRule (.*) http://theDestinationDomain.com/$1 [P,L]

That Just don't work... That make always the redirection to theDestinationDomaine.com/...

Any idea ?

Thanks a lot !

See you

Olivier


Note the extra E. :)

RewriteCond %{REQUEST_URI} !/uploads/
RewriteCond %{HTTP_HOST} theDomainThatWillBeRedirect.com
RewriteRule (.*) http://theDestinationDomain.com/$1 [L,R=301]
0

精彩评论

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