Simple .htaccess
Posted: Mon Jun 25, 2007 9:44 pm
Edit: This seems to work, however on directory requests I'm not getting index.php (or default script) - how I add that?
I borrowed this from CMSMS thinking it should be a simple matter...unfortunately my understanding of regex is not where it could be. 
All I need it to do is this:
1) When passed a file w/ path I need that path to be passed to index.php (inside docroot).
2) Keep or persist the GP{C} variables so I do not have to parse the URL manually inside script
3) If the requested file already exists, who cares, ignore it and send it's path to index.php instead
Can someone please give me the proper set of instructions to get this fired up?
Thanks
Code: Select all
RewriteEngine on
RewriteBase /
RewriteRule ^(.+)$ index.php?path=$1 [QSA]Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
#RewriteCond %{REQUEST_FILENAME} [NC]
RewriteRule ^(.+).php$ index.php?page=$1 [QSA]All I need it to do is this:
1) When passed a file w/ path I need that path to be passed to index.php (inside docroot).
2) Keep or persist the GP{C} variables so I do not have to parse the URL manually inside script
3) If the requested file already exists, who cares, ignore it and send it's path to index.php instead
Can someone please give me the proper set of instructions to get this fired up?
Thanks