Forum Moderators: phranque
I need urgent help on a very small issue. Below is my .htaccess file which works properly on the root folder but not on the subfolder of a domain
*********************************
RewriteEngine on
RewriteBase /
AddType application/x-httpd-php .htm .html
php_flag magic_quotes_gpc off
php_flag register_globals on
php_flag upload_max_filesize 100M
RewriteRule ^(index\.html¦contact\.html¦portfolio\.html) - [L]
RewriteRule ^([^/]+)\.html$ /page.php?main_code=$1 [L]
RewriteRule ^([^/]+)/([^/]+)\.html$ /page.php?main_code=$1&left_menu_code=$2 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)\.html$ /page.php?main_code=$1&left_menu_code=$2&left_sub_code=$3 [L]
ErrorDocument 404 /404.php
*********************************************
All files including the .htaccess are in the folder named "2008"
Thanks in Advance
If this .htaccess file is located in "/2008" and "page.php" is also located in "/2008," then the substitution URLs (actually filepaths) on the right side of the rule must include "2008" -- Without it, "page.php" will be expected to reside in the Web root directory.
As in many cases, examining your server error log will likely be quite helpful in sorting this out.
Jim