Removing Extension On Homepage?

Discussion in 'HTML & Website Design' started by gobbly2100, Jan 23, 2008.

  1. #1
    Hey,

    I want search engines and visitors to be directed to the domain without it being www.huxleygame.com/index.php I want it to be the domain without the index.php on the homepage.

    I am trying to use the .htaccess with 301's but it does not seem to work but it does work for the other extensions such as index.html.

    Thanks in advance!
     
    gobbly2100, Jan 23, 2008 IP
  2. Xeter_Design

    Xeter_Design Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    have you tried a php redirect?

    Try using this within your .htaccess file

    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{REQUEST_URI} ^$
    RewriteCond %{HTTP_HOST} ^domain.com$
    RewriteRule ^$ http://domain.com/ [L,R=301] 
    Code (markup):
    Replace domain.com with the URL of your site

    Regards,
    Nick
    CEO Xeter Design and Development
     
    Xeter_Design, Jan 23, 2008 IP
  3. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can use a free URL shortening/redirection facility such as Metamark.

    Edit: Sorry, I missed your "same domain name" requirement.

    James
     
    jamesicus, Jan 23, 2008 IP
  4. Xeter_Design

    Xeter_Design Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nice share mate...repped
     
    Xeter_Design, Jan 23, 2008 IP