graham23s Posted November 25, 2009 Share Posted November 25, 2009 Hi Guys, I have tested a few categories out with the .htaccess code: Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^[^/]+-([A-Z0-9]+)\.html$ product-information.php?id=$1 [QSA,L] RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([0-9A-Z]+)-[^/]+\.html$ category.php?cat-id=$1 [QSA,L] The categories are: Books, DVD, Toys, Electricals All of them work great apart from DVD it shows me an on site error i shouldn't really see, the only difference from the DVD category to the rest of them is that the word DVD is all in capital letters would that make a difference? cheers guys Graham Quote Link to comment Share on other sites More sharing options...
keldorn Posted November 25, 2009 Share Posted November 25, 2009 Capital letters matter on Linux server, to map a file to the system, INDEX.html is not the same as index.html, nor is InDex.html. Capital letters do not matter in a Mysql row indice. So you have stored "dvd" in the a row , and you select the row that says DVD it will work. On windows server capital letters make no difference. Which actually causes a bug, if you search for "w3school php" on Google, you'll see its DEfaULT.asP , someone got the page indexed like that as a joke... Most likely. Again Capitcal letters matter in your regex also, yours only currently serearching for A-Z, I think you need, [0-9a-zA-Z] Quote Link to comment Share on other sites More sharing options...
graham23s Posted November 25, 2009 Author Share Posted November 25, 2009 Hi Mate, Strangely it does the same on my localhast (windows) amd Host account (Linux) even with the regex you gave me, i have done a little php fix to combat it, but it's definately a starnge one. thanks mate Graham Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.