php - finding the names and view of all apache environment variables -
i want know if there link of environment variables in apache , when printed out.
the reason trying write regex .htacess mod_rewrite, don't know these variables printing. it's hard write regex when im not sure printed, keep getting them wrong. there list somewhere missing.
trust me googling easier posting question , waiting response , people not quite sure asked.
i can't seem find google source.
eg %{the_request} /index.php http/1.1
the real problem having have .htaccess file
# not remove line, otherwise mod_rewrite rules 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 url 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
i keep getting redirected error page trying to
example.host56.com/home/
but keeps leading me errors. home folder has index.php file inside of well
here's mod_rewrite variable cheat sheet: http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html
the rule here:
rewritecond %{request_uri} / rewriterule ^(.*)$ home/$1
is looping. reason because %{request_uri}
variable always starts /
, , you're not using either "^
" or "$
" denote matching boundaries, condition true. since it's true, rule replied. , since rewrite engine continually loops until uri stops changing (or until you've reached internal recursion limit, causing 500 error), pattern matches. try changing to:
rewritecond %{request_uri} !^/home/ rewriterule ^(.*)$ home/$1
or
rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ home/$1
Comments
Post a Comment