mod_rewite ENV variable to php $_ENV

This is a discussion on mod_rewite ENV variable to php $_ENV within the PHP General forums, part of the PHP Programming Forums category; Does anyone know if it's possible to pass an ENV variable created using a mod_rewrite rule in an .htaccess ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2007
sam@bigroomstudios.com
 
Posts: n/a
Default mod_rewite ENV variable to php $_ENV

Does anyone know if it's possible to pass an ENV variable created
using a mod_rewrite rule in an .htaccess file to the $_ENV superglobal
in php? I assumed this would work:

RewriteRule ^(.+[^/])(/?)$ /#/$1/ [R,NE,L,E=OLD_PATH:$1]

<?php echo $_ENV['OLD_PATH']; ?>

But it does not, at least with my configuration. Is it a
configuration issue, or is this just not possible?

Any other soltuions to this problem? I need to get that path info to
php and rewite it remotely at the same time. I also tried this
approach which didn't work, pardon my mod_rewite nubishness.

RewriteRule ^(.+[^/])(/?)$ index.php?path=$1 [L]
RewriteRule ^(.+[^/])(/?)$ /#/$1/ [R,NE]

Thanks,
Sam

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0