Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    3
    Member #
    8703
    I have a CGI script that uses variables which must be passed from page to page. If I run the CGI script, I cannot use Server Side Includes. Currently, if I use SSI, I cannot pass a variable from the URL.

    I would like to use the Apache mod_rewrite RewriteRule to pass a variable. The

    RewriteRule ^([a-z0-9]+)/([a-z0-9]+)$ $2.html [E=MY_VAR:$1,L]

    isn't working.

    I've tried other things, but this is what the Apache documentation indicates is supposed to work. I'm on Apache 1.3.27

    Can anyone help? Please and many thanks!

  2.  

  3. #2
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    I remember about two years ago I wrote a custom handler that would load pages, perform SSI and allow special includes such as results from CGI applications and running external programs. Luckily I keep all my old code, I used something like this:

    RewriteEngine on
    RewriteRule (.+).shtml pageprocessor.pl?page=$1&template=shtml

    How are you trying to pass your variables? What's the script? Your current regexp picks up two lowercase alphanumeric strings seprated by a "/" and end with a $, then attempts to load the file that is supplied by the second item with some Apache-specific custom specifiers derived from the the first item. What language is the receiving script in?

  4. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    3
    Member #
    8703
    Thanks Mixu,

    I don't know any scripting languages, so I don't use a script such as you show to process my pages. I am trying to pass the variable straight to an SSI include statement such as <!-- echo var="MY_VAR" -->

    And may I say, without much success.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:52 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com