Welcome Guest ( Log In | Register)



3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> How To: Change Your Website's Index File, a simple trick using .htaccess
contor
post Oct 23 2006, 05:48 PM
Post #11


Advanced Member
*******

Group: Members
Posts: 144
Joined: 17-September 06
Member No.: 30,138



The only little problem is that all the index in your page will have another name
so if you have a forum it will cause some big problems.

But is a good advice for thouse who wanted
Go to the top of the page
 
+Quote Post
sportytalk
post Apr 5 2007, 11:07 PM
Post #12


Super Member
*********

Group: Members
Posts: 326
Joined: 7-October 05
Member No.: 12,650



This is a very good tutorial. It is easy to read and easy to understand.

The only problem is that at the moment, I don't have the need to change my website's index file. However, there's bound to be other users out there who do want to change the website's start page. This tutorial will certainly help.
If anyone ever asks me how to do it, I will refer them to this topic.

Thanks for sharing smile.gif

This post has been edited by sportytalk: Apr 5 2007, 11:07 PM
Go to the top of the page
 
+Quote Post
hippiman
post Apr 11 2007, 03:32 AM
Post #13


Premium Member
********

Group: Members
Posts: 150
Joined: 9-April 07
From: Nebraska
Member No.: 41,301



Do you need to add a .htaccess file to every directory, or just the ones that you're changing from index, or does it change the index file for all your directories? If it did it for every directory in the directory, unless you told it otherwise, that'd be great!
I don't think I'll really use it that much, though. It's just easier for me to use index.

Does it automatically accept index.php over index.html? I haven't checked that yet. huh.gif
Go to the top of the page
 
+Quote Post
Blessed
post Apr 11 2007, 11:20 AM
Post #14


Advanced Member
*******

Group: Members
Posts: 144
Joined: 22-March 07
Member No.: 40,472



wow nice one m8
i thin't know this

something new for me biggrin.gif
Go to the top of the page
 
+Quote Post
Imtay22
post Apr 11 2007, 01:20 PM
Post #15


Super Member
*********

Group: [HOSTED]
Posts: 299
Joined: 27-January 07
From: Winter is cold here.
Member No.: 37,984
Spam Patrol



so if i use your code, can I make it in a different directory, like direc/index.php ? can You do that? I will try it. Thanks for finding this!
Go to the top of the page
 
+Quote Post
electriic ink
post Apr 11 2007, 03:00 PM
Post #16


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,223
Joined: 11-February 05
From: Heaven
Member No.: 3,709



QUOTE(hippiman)
Do you need to add a .htaccess file to every directory, or just the ones that you're changing from index, or does it change the index file for all your directories? If it did it for every directory in the directory, unless you told it otherwise, that'd be great!


Unless separate .htaccess files are in the subdirectories with this code in, this will work for the directory the file is in and all subdirectories.

QUOTE(hippiman)
Does it automatically accept index.php over index.html? I haven't checked that yet


I don't know but you can set it so the server looks for index pages in a different order:

CODE
DirectoryIndex index.php index.html


Now the server looks for index.php to show as the default index page; if it can't find index.php, it looks for index.html, which it displays as the default index page. If neither are found, the 404 error page is shown.



Go to the top of the page
 
+Quote Post
Forbez
post Apr 11 2007, 10:32 PM
Post #17


Privileged Member
*********

Group: [HOSTED]
Posts: 624
Joined: 13-December 06
Member No.: 35,271



Good tut, but I don't understand why you would eed to change it for.
Good work anyways.
Go to the top of the page
 
+Quote Post
Striker9099
post Jul 5 2007, 09:43 PM
Post #18


Member [Level 2]
*****

Group: Members
Posts: 79
Joined: 30-June 07
Member No.: 45,745



VERY nice! I was actually wondering how to change my current index file on my new website... I've always used CMS's in building my websites... this time I want to try something different, so this tutorial is definitely helpful since I actually didn't know how to do it... thanks again buddy, keep it up smile.gif
Go to the top of the page
 
+Quote Post
shomazta
post Jul 10 2007, 10:52 PM
Post #19


Newbie [Level 1]
*

Group: Members
Posts: 11
Joined: 10-July 07
Member No.: 46,284



could I possibly set it up to go to another directories index page?? say for instance I have a forum but I haven't coded the "main" site yet so I went and installed the forum in a directory called /forum

could I have it do
CODE
DirectoryIndex forum/index.php
Go to the top of the page
 
+