Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 11:10:42 AM

Pages: [1]   Go Down
  Print  
Author Topic: domain index page redirection  (Read 1021 times)
LakeXeno
Intergalactic Superstar
*****
Offline Offline

Posts: 196



WWW
« on: March 02, 2008, 09:26:40 PM »

I have used the search function numerous times yet i'm not sure exactly what to search for? Doh

This is my setup:
in my root directory I have SMF and it's index.php

What I'm hoping for:
when someone comes to www.villageofmagic.com they instead go to http://www.villageofmagic.com/directory.php (so they see we have more up then just a forum lol.)

If I were to setup a redirection for /index.php would that mess up SMF?
Logged


http://www.lakexeno.com

We are a community of many faiths and lifestyles. We provide a place to sit, mingle & chat amongst common friends.
wektech
Master Jedi
*****
Offline Offline

Posts: 1031



WWW
« Reply #1 on: March 03, 2008, 04:24:45 AM »

This is one of the problems with installing SMF or any other script in the default (public_html) directory. You certainly do NOT want to redirect index.php as it will cause SMF to quit working. Instead your best bet (short of moving the SMF install to a different directory) is to add the following to your .htaccess file:

Code:
DirectoryIndex directory.php
Logged

MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5219



« Reply #2 on: March 03, 2008, 06:24:46 PM »

This is one of the problems with installing SMF or any other script in the default (public_html) directory. You certainly do NOT want to redirect index.php as it will cause SMF to quit working. Instead your best bet (short of moving the SMF install to a different directory)

I agree 100%. Never install anything other than the site control files (.htaccess, robots.txt, error documents, favicon.ico) and possibly your Home Page into public_html/. Put major subsystems into their own subdirectories (e.g., public_html/forum/ to hold SMF). If you don't want to move SMF to a lower level,

Quote from: wektech
is to add the following to your .htaccess file:

Code:
DirectoryIndex directory.php

will work. Instead of looking for index.html, then index.htm, and finally index.php, the server will look only for directory.php. That could cause problems down the road, so I would extend the llist:

Code:
DirectoryIndex directory.php index.html index.htm index.php

This will keep things as before, except for looking for "directory.php" first.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
LakeXeno
Intergalactic Superstar
*****
Offline Offline

Posts: 196



WWW
« Reply #3 on: March 05, 2008, 09:58:15 AM »

apologies for the over-late response. i'm in the army and the last two weeks been kind of hectic.

thanks for the info, i'll probably just move SMF to a sub directory then.

have a good one guys,
cameron.
Logged


http://www.lakexeno.com

We are a community of many faiths and lifestyles. We provide a place to sit, mingle & chat amongst common friends.
Pages: [1]   Go Up
  Print  
 
Jump to: