SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard Mincer's Avatar
    Join Date
    Mar 2001
    Location
    London | UK
    Posts
    1,140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force ANY page request through a script??

    Would it be possible to pass any page request through a script?

    I want to have a directory structure with real files called 1.html, 2.html etc and then for people to be able to use them as links, but if someone puts in the url www.foo.com/bar/1.htm then the page is not displayed directly, but my script is called (same script for all site pages) and it can then do it's stuff based on the url supplied.

    TIA,

    Matt.

    EDIT: I've read the tutorials at sitepoint and they do not quite do what I'm after.

  2. #2
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could do it in apache with MOD_REWRITE.

    I don't know HOW, but I know it can be done. (-:

    In IIS, you could move all of your files out of the webroot, and make a 404 error (custom errors tab) redirect to your script, which could parse the URL.

    Either way is a bit complicated, though.

    S

  3. #3
    SitePoint Wizard Mincer's Avatar
    Join Date
    Mar 2001
    Location
    London | UK
    Posts
    1,140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by scoates
    you could move all of your files out of the webroot, and make a 404 error
    This was one of my options, to move the files into a /content folder and use the 404 trapping method.

    Perhaps that is my best option?

    I'm running Apache on a Win2k server btw. The idea is that I'll give FTP access to the people from each office that are allowed to update the pages, and then they can upload to their own directory. These 'bare' html pages (no navigation bars/header etc) are then wrapped up in the page template by the scripting.

    I want to do something like that in order that the main people to update the pages (the technical illustrators here in my office) can work with the site in dreamweaver as the site will still in effect be 'real pages'. But I can still alter the hearer/footer/menus in one swoop.

    Does that sound feasible??
    Last edited by Mincer; Feb 15, 2002 at 11:20.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •