Folders-like URL with PHP?
Posted
by Maxime
on Stack Overflow
See other posts from Stack Overflow
or by Maxime
Published on 2010-06-08T22:27:39Z
Indexed on
2010/06/08
22:32 UTC
Read the original article
Hit count: 279
Hi,
ever since I added this htaccess to my website, I noticed a HUGE slowdown, and my error logs are filled with errors such as PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in page.php on line 79
. I've got up to four of these per second. Most of the time it works though.
The htaccess consisted of two similar rules: one with two GET vars, another one with only one.
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\/(.*)$ index.php?var1=$1&var2=$2 [L]
Anyway, I just rewrote a PHP script that handles of all the strings and redirects where it should, and my website is now fast again. But is there a way to hide mypage.php?var1=la&var2=lu and still have URLs that look like folders?
Thanks for your replies!
© Stack Overflow or respective owner