apache alias

Glad I found this message board. Have been going round in circles attempting to do the following.

I have 137 php files that work perfectly if they are in the root directory.
I am using a software package that allows me to convert .txt files to html, and incorporate into it all the php files necessary to have the data appear formatted in a web page display (containing all the links of our normal web page display). I then can change the extension from .html to .php and it works perfectly.

This is good I can do this but what I'd like to do is have these files run from four different subfolders under a main folder, with each folder containing a set of files

The main folder is called feeds and under it are four subfolders (where I want to store the php files for easy maintenance, etc. So folder1 would have files that belong to a certain critera, folder2 through folder4 would contain files fitting those criteria.

A user fires up a browser, navigates to a page of "New Items Now Available"
where he can choose between one of the four lists. He is taken to the specific page and can then click a link to lets say "New Items in Practical Nursing".

As mentioned, if I put all the php files in root it works, but when I move them to folder "feeds" and the subdirectories below it containing the files, I no longer get a webpage display.

I have tried all different kinds of syntax setting up an alias in apache but each time I do so nothing works at all. Web pages are not found for anything. So I take it out and everything is back to normal except I can't get my php files in feeds/subfolders to display as a formatted web page with a sidebar, the links to other pages, etc.

Any help would be Greatly appreciated. Thank you in advance.


Comments

  • One very blunt way is to set up a virtual host (see ) for each folder. Then change part of your main host into a proxy host for your virtual hosts.
    This allows each of your subfolders to become the root folder for one of the virtual hosts, and still only 1 port is necessary.
    If you don't mind opening more than 1 http port, then you could also leave the proxy host away, and have each virtual host respond to one of the opened ports.

    Alternatively your could write a cgi/php script, which alters the links in the files, which are stored in the subfolders, to include the subfolder names in the relative links.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion