Htaccess redirect for everything but files/directories?

RewriteCond %{HTTP_HOST} ^(www\. )? Domain\.

Com$ RewriteRule ^$ log.domain.com.

Domain.com to log. Domain.com. – VTJustinB Feb 11 '09 at 15:34 Mmm, yeah, / being a directory and all.

Give the revised version a shot... – chaos Feb 11 '09 at 15:37 REQUEST_FILENAME is never just “/â€?.(Except you use something like this: “RewriteRule ^ /â€?) – Gumbo Feb 11 '09 at 15:46 The revised rule didn't do the trick either--still fails to redirect to log. Domain.com. – VTJustinB Feb 11 '09 at 15:49 Instead of trying to handle the exceptions, would it make more sense to ONLY redirect if the user requests exactly ()?

Domain.com(/)? And nothing else? I'm not sure how to do that, but that seems like it might be an easier approach.

– VTJustinB Feb 11 '09 at 15:51.

Try this: # skip the next rule if host is not example. Com or example.com RewriteCond %{HTTP_HOST}! ^(www\.)?

Example\. Com$ RewriteRule ^ - S # redirect if requested URI does not match a regular file or directory # or if the requested URI path is just "/" RewriteCond %{REQUEST_FILENAME}! -f RewriteCond %{REQUEST_FILENAME}!

-d OR RewriteCond %{REQUEST_URI} =/ RewriteRule ^ http://log.example.com.

Thanks Gumbo, I believe your first rule would do the trick as well. – VTJustinB Feb 11 '09 at 16:22.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions