odd problem
Posted: Sun Oct 29, 2006 7:59 pm
I dont even know if its related to PHP or Apache ....
The above code works and gives me the correct count from `links` table if I execute the file as http://server.com/index.php, yet it fails if I execute it as http://server.com/
The following code works in both cases:
My ./htaccess file is:
I'm lost. Whats going on here? 
Code: Select all
$links_total = mysql_num_rows(mysql_query('SELECT `id` FROM `links`'));The following code works in both cases:
Code: Select all
$pages_total = mysql_num_rows(mysql_query('SELECT `id` FROM `pages`'));Code: Select all
RewriteEngine on
RewriteRule ^(.*)/$ index.php?path=$1 [QSA,L]
RewriteRule ^/$ index.php [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?path=$1&page=$2 [QSA,L]
RewriteRule ^index.html$ index.php [QSA,L]