[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Hiding PHP scripts in URLs



Hi,

I'm trying to set up a virtual domain on the Raq2 so that requests to:

http://www.mydomain.com/a/b/c

go to a PHP page that would get the '/a/b/c' part in the script info environmental variable.

I'm still feeling my way around Apache (just finished the very good 'Professional Apache' book from Wrox), so my first attempt was to put an Alias directive into the site's .htaccess file:

Alias / /home/sites/www.mydomain.com/php/mysite.php3

Of course, Alias directives aren't allowed in .htaccess files so this did nothing but bring the domain down! It's supposed to go in one of the conf files, and I've found a place for it in srm.conf. Only, if I put it there then it seems like EVERY domain on the RAQ would get so directed and I only want one.

Am I able to write something like this?

Alias http://www.mydomain.com/ /home/sites/www.mydomain.com/php/mysite.php3

Or should I be putting this alias directive into the Virtual Host container for the domain I want it to apply to (inside httpd.conf)? If I do this then won't Cobalt's scripts overwrite this at some point? It's not clear from reading the file or Cobalt's docs, just how this file is being generated/appended as domains are created/edited...

Thanks for any help,
doug