Setting a default main page

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Post Reply
rupali
New php-forum User
New php-forum User
Posts: 140
Joined: Thu Oct 13, 2011 10:32 pm
Location: Chandigarh, INDIA

Re: Setting a default main page

Post by rupali » Tue Jan 24, 2012 2:17 am

setting a default page is created in same as we create html page, to call php we need to use redirection in form attribute with the filename in "action" or there are some other methods for redirection in php.

User avatar
L33R
New php-forum User
New php-forum User
Posts: 144
Joined: Fri Dec 30, 2011 4:27 am
Location: Liverpool

Re: Setting a default main page

Post by L33R » Tue Jan 24, 2012 6:43 pm

call it index.html or put a .htaccess file in the root directory with

DirectoryIndex index.php index.html

should load index.php first and index.html if the first file doesnt exist.... you can put in any filenames

DirectoryIndex thisfileonly.php

DirectoryIndex hoorah.php checkbox.php

etc...

User avatar
L33R
New php-forum User
New php-forum User
Posts: 144
Joined: Fri Dec 30, 2011 4:27 am
Location: Liverpool

Re: Setting a default main page

Post by L33R » Tue Jan 24, 2012 7:06 pm

oh yeah there is a problem in windows that doesnt like you to call or rename a file .htaccess

if you create it in notepad it will save it as .htaccess.txt

just remove the txt and save as .htaccess.

windows automatically saves it as .htaccess

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests