redirect to index.php

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

uncertain_manos
New php-forum User
New php-forum User
Posts: 31
Joined: Wed Oct 23, 2002 12:55 am

redirect to index.php

Postby uncertain_manos » Mon Feb 03, 2003 2:51 am

hi all,

I have made a php page with a counter in it, named index.php. The problem that I now am facing is that I don't know how I can make the browser load this page (index.php) when the user first inputs the domain name. In other words, I want to make the browser download the index.php when the user asks for http://www.domainname.com
Any ideas?

regards,
Manos

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Mon Feb 03, 2003 3:02 am

most host setup will parse certain files automatically, most commonly

index.html / index.htm
[perhaps] home.html
index.php

So... to get index.php running, just remove any index.html/.htm/home.html/.htm files from the public-root folder.

You could also use mod_rewrite (if configured) or a scripted redirect (either metas, js or php)

uncertain_manos
New php-forum User
New php-forum User
Posts: 31
Joined: Wed Oct 23, 2002 12:55 am

Postby uncertain_manos » Mon Feb 03, 2003 4:00 am

pootergeist wrote:most host setup will parse certain files automatically, most commonly

index.html / index.htm
[perhaps] home.html
index.php

So... to get index.php running, just remove any index.html/.htm/home.html/.htm files from the public-root folder.

You could also use mod_rewrite (if configured) or a scripted redirect (either metas, js or php)


thanks,
I tried myself before and it worked out. Thanks again for bothering to answer
regards,
Manos


Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest