Link to home
Create AccountLog in
Avatar of Azurewave
Azurewave

asked on

htaccess explination

can you guys please explain what the following does?

RewriteCond %{QUERY_STRING} !.*track=.*
RewriteCond %{HTTP_COOKIE}  !.*trackc.* [NC]
RewriteCond %{HTTP_USER_AGENT}  !.*(googlebot|msnbot).* [NC]
RewriteRule ^index\.(html|php)$ http://www.domain.com/track/6 [L,R=301]

also what does NC mean and , L, R
ASKER CERTIFIED SOLUTION
Avatar of jeremycrussell
jeremycrussell
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Azurewave
Azurewave

ASKER

Hey there, can you just answer one last thing, what do you mean Last rewrite rule in the chain, if there are more rewrite rules after that it will ignore them?
It causes the current request to stop processing the rules.  However, note that at that point, you can sent a redirect to the client, so they make another request that starts to get processed again.  The reason I point this out is that the [L] flag is not something that will close a loop if one is created.  It will simply stop the rule processing and send the current redirect.
Not sure what I was doing here, but

"you can sent a redirect to the client, "  should read " the server sends the redirect to the client".