Redirect "something.com/?" to a script

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
benforbes
Forum Newbie
Posts: 6
Joined: Tue Aug 02, 2005 6:56 pm

Redirect "something.com/?" to a script

Post by benforbes »

I've seen some sites where you can specify GET variables in the address without naming a script, eg:

Code: Select all

bash.org/?random1
How can I set up my Apache server to do something like this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's already done... the query string is passed directly to the index of that path..
benforbes
Forum Newbie
Posts: 6
Joined: Tue Aug 02, 2005 6:56 pm

Post by benforbes »

Do you mean index.html? My server doesn't parse .html for php, do I have to make it do that?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

if hosted, your host should have set up several index files, including index.php ... check their settings to find out..
benforbes
Forum Newbie
Posts: 6
Joined: Tue Aug 02, 2005 6:56 pm

Post by benforbes »

I found the problem. I wasn't restarting the server after adding index.php to DirectoryIndex. :oops:
Post Reply