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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|