can someone help explain this to me?

New to mod_rewrite? This is a good place to start.

can someone help explain this to me?

Postby bjeanes » Tue Jan 31, 2006 6:52 am

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
bjeanes
 
Posts: 1
Joined: Tue Jan 31, 2006 5:47 am
Location: Australia

Return to Beginner's Corner

Who is online

Users browsing this forum: Google [Bot] and 35 guests

cron