#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    PA
    Posts
    15
    Rep Power
    0
    I was fascinated by a scheme for presenting structured, low-maintenance websites over at Webmonkey
    (http://hotwired.lycos.com/webmonkey/99/25/index2a.html?tw=programming)

    I'm working on my own variant, but I can't seem to get the most basic setup working. I want to hijack the url and pass it to the main script, where it is split on '/' and fed into an array. In the webmonkey article, they do this with an XSSI virtual include.

    This doesn't seem to work under IIS. Is this because of the way IIS implements SSI, because I can't get a UNIX-style symbolic link under WinNT, or something else entirely. All I get from the SSI include is 'error processing SSI file /meta/structure.phtml'. A PHP include doesn't give me the URL I'm looking for. NT is not my primary platform, so I may be missing something obvious here. Any clues would be *greatly* appreciated!

    Many thanks in advance-
    -scott

    ------------------
    --
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    No need to use an SSI to do this. If you are using php just do this (assuming $url contains the URL to be parsed):

    $url_array=explode('/',$url);

    Which will place the elements of the URL into the array $url_array, split on the /.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    PA
    Posts
    15
    Rep Power
    0
    I'm sorry, I don't think I expained my problem clearly enough. Loading the URL into an array isn't the problem. $url_array=(split("/",$url)); works just fine in the original script. The problem remains that the URL the user goes to doesn't get 'hijacked' to point at the one script in the /meta directory that runs the whole site.

    *Every* URL in the domain should pass through this one script, or I have to include() the script in every page, which adds maintenance that I was trying to get rid of in the first place. The way they had it set up was to have "index.html" (the default home page) set as a symbolic link to the actual home page (e.g. widgets.html) where "widgets.html" does nothing but an XSSI include of "/meta/structure.phtml". So if you go to, say, "http://widgets.com/widgets/blue/" and you do $url=PATH_INFO; from the script, since /widgets is really "widgets.html" $url will be set to "/blue/"

    Tricky.

    The webmonkey article explains this a lot better that I am here.
    http://hotwired.lycos.com/webmonkey/...tw=programming

    Thanks-
    scott
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    The only way I know of to do what you are asking is thru Apache mod_rewrite.

    There's an article on using that at www.phpbuilder.com
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    PA
    Posts
    15
    Rep Power
    0
    Thank you for your note, but...

    If I were using Apache, I wouldn't have this problem. After getting their servers hacked down to the BIOS several times, our web host moved our site over to IIS, which they felt they could keep more secure than the Linux server.
  10. #6
  11. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    LOL. If they can't keep Apache/Linux secure, I shudder to think what will happen under NT/IIS.

    I'd recommend finding a different provider.

Similar Threads

  1. Replies: 5
    Last Post: February 2nd, 2005, 12:28 AM
  2. IIS + Win2k Server Problem
    By Programmer123 in forum IIS
    Replies: 1
    Last Post: January 28th, 2004, 12:41 PM
  3. site navigation problem
    By zenbob1 in forum Beginner Programming
    Replies: 2
    Last Post: January 19th, 2004, 05:33 PM
  4. phpAdmin on IIS 4 problem
    By PaulAcquaro in forum PHP Development
    Replies: 2
    Last Post: January 16th, 2004, 06:46 PM

IMN logo majestic logo threadwatch logo seochat tools logo