htaccess

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zura
Forum Newbie
Posts: 9
Joined: Mon Oct 17, 2011 1:04 am

htaccess

Post by zura »

Hi!
How to trim the file name in the address bar?
For example, the
is:

Code: Select all

http://test.com/index.php
http://test.com/registration/page.php
needed:

Code: Select all

http://test.com
http://test.com/registration/
Thank you for your help.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: htaccess

Post by requinix »

Use DirectoryIndex.

Code: Select all

DirectoryIndex index.php page.php
(index.php should already be a default but it doesn't hurt to say it again.)
zura
Forum Newbie
Posts: 9
Joined: Mon Oct 17, 2011 1:04 am

Re: htaccess

Post by zura »

???
sorry.
???
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: htaccess

Post by requinix »

Sorry... what?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: htaccess

Post by social_experiment »

“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply