- Messages
- 4,399
- Reaction score
- 94
- Points
- 48
So... I'm trying to do something with .htaccess, and it won't work...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{REQUEST_URI} $.jpg|.jpeg|.png|.gif
RewriteRule ^(.*)$ http://sharkyonline.co.cc.nyud.net/-/$1 [R,L]
</IfModule>
I want it to check the user agent, if it's not CoralWebPrx, I want it to check the filetype, if it's jpg, jpeg, png, or gif, I want it to redirect it to a new URL on a different server. Now, it works without the REQUEST_URI line. WITH the REQUEST_URI line, it makes no difference if the rewrite block is there or not.
Any ideas?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{REQUEST_URI} $.jpg|.jpeg|.png|.gif
RewriteRule ^(.*)$ http://sharkyonline.co.cc.nyud.net/-/$1 [R,L]
</IfModule>
I want it to check the user agent, if it's not CoralWebPrx, I want it to check the filetype, if it's jpg, jpeg, png, or gif, I want it to redirect it to a new URL on a different server. Now, it works without the REQUEST_URI line. WITH the REQUEST_URI line, it makes no difference if the rewrite block is there or not.
Any ideas?