【发布时间】:2013-05-03 00:39:50
【问题描述】:
我只想知道apache中是否有所有环境变量的链接,以及它们打印出来时的样子。
原因是我正在尝试为 .htacess mod_rewrite 编写一些正则表达式,但我不知道这些变量在打印什么。当我不确定打印的内容时,很难编写正则表达式,我总是把它们弄错。 我失踪的地方有没有清单。
相信我,谷歌搜索比发布问题并等待回复以及人们不太确定您被问到的内容更容易。
我似乎找不到谷歌来源。
例如 %{THE_REQUEST} GET /index.php HTTP/1.1
我遇到的真正问题是我有这个 .htaccess 文件
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
Options +Multiviews
AddHandler application/x-httpd-php .css
AddHandler application/x-httpd-php .js
Options +FollowSymLinks
RewriteEngine On
#NC not case sensitive
#L last rule don't process futher
#R 301 changes the url to what you want
RewriteCond %{HTTP_HOST} !^example\.host56\.com
RewriteRule ^(.*)$ http://example.host56.com/$1 [R=302,L]
RewriteRule ^demo(.*)$ finished$1 [NC]
RewriteCond %{REQUEST_URI} /
RewriteRule ^(.*)$ home/$1
我不断被重定向到错误页面 我正在尝试去
example.host56.com/home/
但它总是让我犯错误。主文件夹里面也有一个 index.php 文件
【问题讨论】:
标签: php apache .htaccess environment-variables