Mod rewrite Mod Rewrite Env变量
使用这个基本示例,我似乎无法让环境变量“接受”Mod rewrite Mod Rewrite Env变量,mod-rewrite,Mod Rewrite,使用这个基本示例,我似乎无法让环境变量“接受” SetEnv APPLICATION_ENV production RewriteEngine On RewriteCond %{ENV:APPLICATION_ENV} =production RewriteRule ^loading$ /images/loading.gif [NC,L] 因为某种原因去 /loading 不显示loading.gif文件 我尝试过使用语法“^production”的许多比较排列,但没有任何效果 我知道只
SetEnv APPLICATION_ENV production
RewriteEngine On
RewriteCond %{ENV:APPLICATION_ENV} =production
RewriteRule ^loading$ /images/loading.gif [NC,L]
因为某种原因去
/loading
不显示loading.gif文件
我尝试过使用语法“^production”的许多比较排列,但没有任何效果
我知道只要删除RewriteCond就可以了,但是这个问题是关于正确比较使用环境变量的问题您也需要使用mod_rewrite设置环境变量:
RewriteRule ^ - [E=APPLICATION_ENV:production]
您还需要使用mod_rewrite设置环境变量:
RewriteRule ^ - [E=APPLICATION_ENV:production]
这是文件中的规则。这是文件中的规则。