changing url of site

Discussion in 'Site & Server Administration' started by nicky s, Nov 20, 2009.

  1. #1
    hey DP

    i would like you help with this if a url is www.mysite.co.uk and a page is www.mysite.co.uk/index.html how do i change that page into www.mysite.co.uk/index

    i know it is done with mod_rewrite or .htaccess but have no idea what im doing or how to do it

    i want it to be categories for example tv series so mysite.co.uk would be a list of tv series family guy, south park, scrubs when clicked the url would be mysite.co.uk/familyguy , mysite.co.uk/southpark , mysite.co.uk/scrubs instead of mysite.co.uk/familyguy.html

    cheers
     
    nicky s, Nov 20, 2009 IP
  2. Brandon Sheley

    Brandon Sheley Illustrious Member

    Messages:
    9,721
    Likes Received:
    612
    Best Answers:
    2
    Trophy Points:
    420
    #2
    I wouldn't point it to index/ you should just point it to the root

    google "301 redirect" and you'll find tons of articles on how to do this
     
    Brandon Sheley, Nov 20, 2009 IP
  3. nicky s

    nicky s Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    what do you mean ok i will have a search for 301 redirect
     
    nicky s, Nov 20, 2009 IP
  4. Brandon Sheley

    Brandon Sheley Illustrious Member

    Messages:
    9,721
    Likes Received:
    612
    Best Answers:
    2
    Trophy Points:
    420
    #4
    you're asking to move
    site.com/index.html to site.com/index
    I suggest just redirecting to
    site.com/
     
    Brandon Sheley, Nov 20, 2009 IP
  5. nicky s

    nicky s Peon

    Messages:
    199
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i think i may of explained it badley

    the idea is to have a url that says mysite.co.uk/ghostwhisperer and another one that is mysite.co.uk/familyguy ect

    instead of mysite.co.uk/ghostwhisperer/index.html
     
    nicky s, Nov 20, 2009 IP
  6. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #6
    He wants to do something like:

    www.mysite.com/category.html

    To

    www.mysite.com/category

    You would do that with the following code in a file called .htaccess in your root folder for that domain:

    
    RewriteOptions inherit
    RewriteEngine on
    
    RewriteRule ^category$ category.html [L]
    
    Code (markup):
    You then change the links on your site to /category instead of /category.html
     
    Silver89, Nov 20, 2009 IP