Jump to content

Capital letters


graham23s

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/182852-capital-letters/
Share on other sites

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]

Link to comment
https://forums.phpfreaks.com/topic/182852-capital-letters/#findComment-965174
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.