Grow your CSS skills. Land your dream job.

URL File Path

  • # June 22, 2011 at 1:47 pm

    I am having a problem finding out how to get rid of the junk after the domain name.

    For instance it says in the URL bar “http://www.harrythefish.com/other%20sites/Rollerston/Home.html”

    However I would like it to say “http://www.harrythefish.com//Rollerston/”

    Any Ideas on how I would do this?

    Thanks :D

    # June 22, 2011 at 1:53 pm

    I’m sure you could use some .htaccess to get rid of the ‘other sites’, but I would just make Rollerston a subdomain, like this:

    rollerston.harrythefish.com

    # June 22, 2011 at 1:54 pm

    how do you add a subdomain onto the server ?

    # June 22, 2011 at 2:05 pm

    You’ll have to contact your hosting provider, everyone is different. There should be a FAQ that you can check out. It’s usually very simple.

    # June 22, 2011 at 2:06 pm

    ok thanks :D

    # June 23, 2011 at 12:32 am

    Honestly as simple as your site is, you probably don’t need to go through setting up a subdomain. If you physically move the “Rollerston” folder up one level in your site file structure, It will go from “http://www.harrythefish.com/other%20sites/Rollerston/Home.html” to “http://www.harrythefish.com/Rollerston/Home.html” (though depending on the coding you may need to fix a few file paths in the code).

    Then if you rename Home.html to index.html (fixing links to that page) someone could type “http://www.harrythefish.com/Rollerston/” and it would hit the right page.

    However, as Ben_Derby said, using .htaccess is really the clean way to do it. It would allow you to set up forwarding from the old URLs so any links you have to your site don’t break. And you can set up other clean URLs like “http://www.harrythefish.com/Rollerston/Contact/” using mod_rewrites. It takes a little bit of know-how, but it’s not a complicated process.

    # June 23, 2011 at 1:00 am

    It’s quite simple as @DboG pointed out. Inside of your Rollerston folder, rename home.html to index.html

    In the snippets section, check out Pretty URL’s as that is your best way to go. It saves unnecessary bulk folders and what not.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".