PDA

View Full Version : HOw to change default index.php?



nadec23
Fri 16th Oct '09, 7:57pm
Hi everyone,

How do I change index.php to something like index2.php?

I tried in forum homepage option in vbulletin, I changed index to index2 but when I access my site like www.domain.com, nothing will appear, but when I write the url address as www.domain.com/index2.php, it will appear.

So how can I change the default landing page to index2.php? So when I write the url www.domain.com, it will automatically land to www.domain.com/index2.php. I mean I don't have to write it manually in the address bar as www.domain.com/index2.php rather I will just write www.domain.com and it will land to www.domain.com/index2.php

Help will be much appreciated.

Regards

Chimpie
Fri 16th Oct '09, 8:11pm
The easiest way is to make the change in your .htaccess file.

Add this to the file...

DirectoryIndex index2.php

nadec23
Sat 17th Oct '09, 12:14am
The easiest way is to make the change in your .htaccess file.

Add this to the file...

DirectoryIndex index2.php

what if I'll put another script that uses index.php? does it mean that the landing page will be index2.php now?

my purpose for changing the default index.php to something like index2.php is for me to use another script in my root server with index.php (like wordpress). Two of my domains are hosted in one server. One with vbulletin script and another one with wordpress script. What I'd like to happen is, when I go to my vbulletin domain, like, www.domain.com, it will be redirected to www.domain.com/index2.php and when I go to my second domain (in wordpress), like, www.domain2.com, it will be redirected to www.domain2.com/index.php.

Chimpie
Sat 17th Oct '09, 7:41am
Two completely different domains should have two completely different .htaccess files.

You should be fine.