| Sunday 21 December 2003 11:24:51 pm 
                                                                
                                                                 Hi, I've finally managed to hide the index.php part of my urls without having to modify the httpd.conf file. So here's how I did it. (ezCrew or anyone who knows .htaccess config, please could you check this for potential security issues as I am not a .htaccess specialist) 
Step 1:In my document root .htaccess file, I created a redirect to my ezp3 directory.
 
**********************************************Options ExecCGI FollowSymLinks Includes MultiViews
 
<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html))$">order allow,deny
 allow from all
 </FilesMatch>
 
RewriteEngine OnRewriteRule ^$ /<path-to-Exponential>/ [R]
 RewriteRule ^/(.*)$ /<path-to-Exponential>/$1
 
DirectoryIndex index.php********************************************
 
Step 2:Added code to my Exponential directory .htaccess file to remove the index.php part of the url.
 
*********************************************<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html))$">
 order allow,deny
 allow from all
 </FilesMatch>
 Options ExecCGI FollowSymLinks Includes MultiViews  
RewriteEngine on# we are reached via /<path-to-Exponential>/ prefix
 RewriteBase /<path-to-Exponential>/
 # first we rewrite the root dir to the handling php script
 RewriteRule ^$ index.php [L]
 RewriteRule ^index\.html$ index.php [L]
 
# strip out the subdirs when the browser requests us from per dir pagesRewriteRule ^.+/<path-to-Exponential>+/.$ $1 [L]
 
# and now break the rewriting for local filesRewriteRule ^<path-to-Exponential>\.php.* - [L]
 RewriteRule ^settings\.* - [L]
 RewriteRule ^design\.* - [L]
 RewriteRule ^var\.* - [L]
 
# anything else is a subdir which gets handled by another php scriptRewriteRule !^index\.php.* - [C]
 RewriteRule (.*) index.php/$1
 ********************************************* Its working for me. 
Simonhttp://www.webrak.co.uk
 |