PDA

View Full Version : Linking directly to a file. called up via sub domain


White Knight
Tue 4th May '04, 10:11am
This might be a different kind of question. So this is what I am trying to do.

www.sportbikes.net (http://www.sportbikes.net) ----> Main Domain for instance in http.conf it goes to /home/sbn/www

I know its pulling the index.php file. But I want to do it with a sub domain.

Like this.

fz6.sportbikes.net ------> Sub Domain in the http.conf but I want it leading to this file /home/sbn/www/fz6.php

Is this possible?

Brad.loo
Tue 4th May '04, 11:17am
Name the file index.php and it will be automaticly pulled whenever that directory is called.

White Knight
Tue 4th May '04, 12:12pm
right.. but in that directory i already have a index.php file.. is it not possible to link directly to a file?

White Knight
Mon 10th May '04, 1:01pm
guess this isnt possible :)

legolas
Tue 11th May '04, 10:54am
That's an awfully weird thing to want to do. Why don't you just create "/home/sbn/fz6/" and move "fz6.php" to "/home/sbn/fz6/index.php" ?

You could look at mod_rewrite. I'm not sure it can do exactly what you want, but it could probably come close.
http://httpd.apache.org/docs/mod/mod_rewrite.html