|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
|
Thread Tools | Display Modes |
|
|||
mod_rewrite and path_info problem
Apache version 1.3 and htaccess only.
I have a small test executable, written in C not script, that works in lighttpd and Apache. However, in Apache, I don't get PATH_INFO data. PATH_INFO prints NULL, PATH_TRANSLATED is empty and SCRIPT_NAME prints the path to my script (which is correct). Output: PATH_INFO=(null) SCRIPT_NAME=/cgi-bin/b PATH_TRANSLATED= SCRIPT_URL=(null) IP=71.85.241.27 I'm using mod_rewrite like this: RewriteEngine on RewriteRule ^/?([a-z/-]+)$ cgi-bin/my_app [L] I guess it's getting rewritten before Apache handles the info but don't know. In any case, I need to be able to extract everything after the URL, as in example.com/page1/info . I prefer, at least, to get page1/info from somewhere. I question whether I should use mod_rewrite at all and should use some other method or mod. The web app this will run can either handle all requests by itself, or I can divide it up to handle individual requests, such as example.com/page1, example.com/page2, etc. It's been so long since I've touched Apache that I'm sure I'm doing something wrong. |
|
|||
My host provider says they "believe" the problem may lie with the app not being compiled on their server. The program runs and does everything it's supposed to, it just can't seem to pull out the env data for PATH_INFO. I can get the IP which negates what they say? Don't know.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boot problem. Geometry problem? | gulanito | FreeBSD Installation and Upgrading | 0 | 3rd July 2009 03:03 AM |
Can't get PATH_INFO using getenv() | drhowarddrfine | General software and network | 5 | 8th May 2008 07:13 PM |