2010-10-29 7 views
2

J'ai une petite question cette fois très simple, je pense ... Comment ai-je écrire mon htaccess pour faire ces instructions:.htaccess: si est un chemin, ne rien faire, sinon, faire le rewriterule

IF est "/ uploads" CHEMIN DANS MA DEMANDE, PAS REDIRECT TOUT, JUSTE FAIRE LA DEMANDE RÉGULIER DOIS-LE rewriterule: (. *) RewriteRule http://theDestinationDomain.com/ $ 1 [P, L]

J'ai testé que:

RewriteEngine on 
RewriteCond %{REQUST_URI} !^/uploads/(.*) 
RewriteCond %{HTTP_HOST} theDomainThatWillBeRedirect.com 
RewriteRule (.*) http://theDestinationDomain.com/$1 [P,L] 

Cela ne fonctionne tout simplement pas ... T chapeau faire toujours la redirection vers leDestinationDomaine.com/...

Une idée?

Merci beaucoup!

Voir vous

Olivier

Répondre

2

note extra E. :)

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

travail! Génial. Merci beaucoup ! Finalement, juste une condition très simple. À plus. Bon week-end –