i have this mod_rewrite rule from a joomla! isntall. i understand teh concept of mod_rewrite fine, it's just, having never used it effectively, i can't exactly "read" rules. the following snippet does sooooo much in Joomla! (there is probably more to it in teh actual PHP code) and i was wondering how it works. the first line i dont care about soo much. the last 3 are what intrigue me. what does the !-f and !-d (can't google it cuz google such searches for 'd')
- Code: Select all
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
also how does it use %{REQUEST_FILENAME}. sorry to inconvenience anyone with silly newbie questions, but i want to start using mod_rewrite the same way joomla does, and this here is the next step in the learning process for me.
thanks, Bo