我有一个本地开发环境,只是Windows 7 32位上的wamp安装。
现在我的问题是我现有的项目内容想要重定向很多。用.htaccess和狗屎。我的本地网络服务器没有给出一个:
Fout 310(net :: ERR_TOO_MANY_REDIRECTS):Er zijn te veel omleidingen。
错误310(net :: ERR_TOO_MANY_REDIRECTS):对于许多重新指示 - 我在荷兰语中出现错误我想这是英文版
现在我的饼干没有问题。它告诉我检查一下。
我的.htaccess看起来像这样:
RewriteEngine On
#RewriteCond %{HTTP_HOST} !^localhost\.?(:[0-9]+)?$
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=404,L]
DirectoryIndex index.php
# -[PHP.INI OVERRIDE]- -----------------------------------------------------------------------------------------------------------
php_value register_globals 0
# -[UPLOAD MAX FILE SIZE]- -----------------------------------------------------------------------------------------------------------
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 120
# -[ERROR REPORTING]- -----------------------------------------------------------------------------------------------------------
# Complete error reporting
# php_value error_reporting 8191
# Zend error reporting
# php_value error_reporting 128
# Basic error reporting
php_value error_reporting 8
# Minimal error reporting
# php_value error_reporting 1
# -[ERROR DOCS]- ----------------------------------------------------------------------------------------------------------------
ErrorDocument 403 /index.php?mode=error&type=403
ErrorDocument 404 /index.php?mode=error&type=404
ErrorDocument 500 /index.php?mode=error&type=500
# -[BESTAAT BESTAND -> DOORGEVEN] ------------------------------------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [QSA,NC,L]
# -[CMS]---- ---------------------------------------------------------------------------------------------------------------------
RewriteRule ^cms/$ cms/ [QSA,L]
# -[GLOBAL]- ---------------------------------------------------------------------------------------------------------------------
RewriteRule ^error/403$ index.php?mode=error&type=403 [L]
RewriteRule ^error/404$ index.php?mode=error&type=404 [L]
RewriteRule ^error/500$ index.php?mode=error&type=500 [L]
RewriteRule ^([0-9a-z_-]*)/([0-9a-z_-]*)/([0-9a-z_-]*)/([0-9a-z_-]*).html$ index.php?mode=$1&mode2=$2&mode3=$3&html=$4 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*)/([0-9a-z_-]*)/([0-9a-z_-]*)/$ index.php?mode=$1&mode2=$2&mode3=$3 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*)/([0-9a-z_-]*)/([0-9a-z_-]*).html$ index.php?mode=$1&mode2=$2&html=$3 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*)/([0-9@a-z_-]*)/$ index.php?mode=$1&mode2=$2 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*)/([0-9a-z_-]*).html$ index.php?mode=$1&html=$2 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*)/$ index.php?mode=$1 [NC,QSA,L]
RewriteRule ^([0-9a-z_-]*).html$ index.php?html=$1 [NC,QSA,L]
答案 0 :(得分:0)
当呼叫Rooth路径等时,Wamp会跳过根(/ www)到后面的文件夹。因此,不要删除wamp生成的文件,当你有一个项目时,你需要运行本地测试wamp创建一个文件夹/ www like / www / myproject。 Wamp使该文件夹成为根目录。
当像root_path一样在php中调用一个神奇的常量时,它会执行此操作:
<德尔> /万维网 / myproject的