Thanks to everyone who has helped me with my clean URL quest. I'm almost there but want to lick this last thing.
.htaccess
RewriteEngine on
#REMOVE THIS LINE ON SITE LAUNCH!
RewriteBase /~accountName/
#Hide .php extensions for cleaner URLS
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
#calendar-expanded REST-ful URLs
RewriteRule ^calendar-expanded(/.*)?$ calendar-expanded.php$1 [L]
Options All -Indexes
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
# propagate php.ini file to all sub-directories
suPHP_ConfigPath /home/accountName/public_html/php.ini
my working url
www.example.com/calendar-expanded/4/mother-mother-in-concert/
a broken url
www.example.com/calendar/12/another-band-live/
There is no mod re-write for calendar/
obviously. My question is, do I absolutely need a rule for every page to avoid internal server errors if someone accidentally browses to the wrong page? The broken url is an example of that. I'd really love for the browser to return a 404 error instead.
I'm looking for a cond/rule that will cover "all other" urls except calendar-expanded
. Is this doable?
Thanks. (@Gumbo I'm looking hopefully in your direction!)