Help with my sites broken url

Discussion in 'Web Design and Development' started by SchneiderMan, Nov 5, 2009.

  1. SchneiderMan macrumors G3

    SchneiderMan

    Joined:
    May 25, 2008
    Location:
    Apple state
    #1
    So a weird thing is happening, when i do not include the www. before my sites url then it will not take me to my site and it will show as broken..

    Like Schneidersstudios.com/site/reviews.html ( does not work)
    but Schneiderstudios.com works fine..

    And www.Schneidersstudios.com/Site/Reviews.html works fine.
    And www.Schneidersstudios.com/site/reviews.html does not

    Edit: i found out that if i do not use capital letters the url will be broken



    What is wrong? thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    The file system is case sensitive that's all. It's normal behavior. Windows servers don't care about case though.
     
  3. SchneiderMan thread starter macrumors G3

    SchneiderMan

    Joined:
    May 25, 2008
    Location:
    Apple state
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Sure, always make sure your links have the correct case (again, there's not a problem to fix, everything is working as intended). If you're on a Apache web server you can use a .htaccess file to setup a rewrite rule to force everything to lowercase, then make sure all your files are lower case. This means you'll have to change all your files to lower case though so not a great solution for you.

    [Courtesy: http://www.chrisabernethy.com/force-lower-case-urls-with-mod_rewrite/]
    Code:
    RewriteEngine On
    RewriteMap  lc int:tolower
    RewriteCond %{REQUEST_URI} [A-Z]
    RewriteRule (.*) ${lc:$1} [R=301,L]
     

Share This Page