Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

Setting a default main page

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Setting a default main page

Postby Cole001 » Tue Jan 24, 2012 2:08 am

Dear All PHP Experts,

I am a new Guy in PHP.
I want to develop my Website in PHP…
There is a query in my mind while developing a site.
Query is ,

How to set a Default Main Page for my site..
Please help me to solve this problem.

Thank’s in Advance.
Cole
web design company
Cole001
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue Jan 24, 2012 2:03 am
Location: Ahmedabad, Gujarat, India

Re: Setting a default main page

Postby 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.
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

Postby 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: 132
Joined: Fri Dec 30, 2011 4:27 am
Location: Liverpool

Re: Setting a default main page

Postby 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
User avatar
L33R
New php-forum User
New php-forum User
 
Posts: 132
Joined: Fri Dec 30, 2011 4:27 am
Location: Liverpool


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.