Results 1 to 3 of 3

Thread: .htaccess dilema

  1. #1
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default .htaccess dilema

    So I have recently updated a horrible old site to something fresh and good. It seems there are a lot of people that have held onto a certain page in there browser and even when the old files were still on the server this old site didn't function very well at all and had so many broken links it was ridiculous. I have made a load of Redirects in the .htaccess to my custom 404 page. When someone sees this page I have it set to email me the details of what they were looking for and where they came from unless it was saved in their favorites or typed directly then it doesn't show me where they came from.

    The issue is that who ever built the old site files named them with spaces, not hyphens or underscores. So now I'm getting emails with page listings like this - shootersbilliardclub.com/The%20Room.html where the actual title of the file is The Room.html. So I would think that I would just copy the link and put it in the .htaccess file like any other redirect, but with the %20 in there it doesn't recognize the page when someone goes to it cause the browser window uses this - shootersbilliardclub.com/The Room.html so the redirect doesn't work. Now I have tried to put this - The Room.html into the .htaccess file but then if you go to the page it gives me a 500 internal server error cause of the space in the page name.

    Hopefully that was clear enough, so how can I make the redirect work? I'm not real familiar with .htaccess code.

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    I was able to solve this. If anyone else has this same issue the solution is this - "/The Room.html"
    Basically you need to tell the browser to look at it in the literal terms of the wording.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah, good to know. I saw this thread but didn't have any insight. That's simple, though hard to guess. Glad it works.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •