Web Hosting Forum | Lunarpages

Author Topic: How To Make URL's not case sensitive  (Read 21295 times)

Offline kerokura

  • Pong! (the videogame) Master
  • *****
  • Posts: 29
    • Art of Hyo Shim
Re: How To Make URL's not case sensitive
« Reply #15 on: October 06, 2006, 03:09:56 AM »
sorry...but how do you add it to that .htaccess directory? for me, it says "can't find a valid editor to open this file"...I don't know what I'm doing>_<

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7499
    • Turner's Lounge
Re: How To Make URL's not case sensitive
« Reply #16 on: October 06, 2006, 05:24:42 AM »
the .htaccess file is a plain text file, so you should be able to open it in any text editor, for example notepad.

hope this helps
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline Kaladar

  • Space Explorer
  • ***
  • Posts: 7
Re: How To Make URL's not case sensitive
« Reply #17 on: December 18, 2006, 06:06:43 PM »
Works great, thanks. Is there any way to get rid of the end / in the URL? That is , if I forget to put the last slash at the end, I get an error message. Cheers.

RandyT

  • Guest
Re: How To Make URL's not case sensitive
« Reply #18 on: December 18, 2006, 06:27:39 PM »
it needs Usecanonicalname for that domain to be turned off in httpd.conf . Please submit a ticket to support@lunarpages.com and we can take care of that for you.

Hope this helps,
RandyT

Offline tegralens

  • Spacescooter Operator
  • *****
  • Posts: 39
Re: How To Make URL's not case sensitive
« Reply #19 on: November 02, 2007, 07:07:18 AM »
I get this error when I did the changes.
Parse error: syntax error, unexpected T_IF in /home/angel20/public_html/404.php on line 5
Anyone know why.

Offline Dr_Test

  • Trekkie
  • **
  • Posts: 10
Re: How To Make URL's not case sensitive
« Reply #20 on: June 24, 2008, 04:54:25 AM »
Same as above. Any ideas?

Offline Vitalian

  • Spaceship Navigator
  • *****
  • Posts: 75
Re: How To Make URL's not case sensitive
« Reply #21 on: June 24, 2008, 07:13:09 AM »
For some reason the PHP code is displayed funny. It looks like certain characters were encoded...

Make sure you have
Code: [Select]
<?php
$lower 
strtolower($_SERVER['REQUEST_URI']);
$new 'http://' $_SERVER['HTTP_HOST'] . $lower;

if (
file_exists(ltrim($lower'/')) && $_SERVER['PHP_SELF'] != $lower){
header("Location: $new");
exit;
} else {
echo 'Page not found';
}
?>

I just changed all the character codes to real characters. It seems to work on my account.

 

Share |