DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th May 2008
drhowarddrfine drhowarddrfine is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 358
Thanked 9 Times in 8 Posts
Default 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.
Reply With Quote
  #2   (View Single Post)  
Old 7th May 2008
drhowarddrfine drhowarddrfine is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 358
Thanked 9 Times in 8 Posts
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 01:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick