semasa saya mencuba laman web saya di localhost, penyemak imbas menunjukkan kepada saya redirected you too many times. Saya mencuba semuanya, tetapi tidak berjaya. Diuji pada pelayan lain juga, keadaan yang sama.

Bagaimana saya dapat menentukan masalah dan mencari hasil tangkapan?

Apache error.log.

[Mon Mar 09 22:46:22.796847 2020] [proxy_fcgi:debug] [pid 9205] mod_proxy_fcgi.c(995): [client ::1:59146] AH01076: url: fcgi://localhost//var/www/html/unihobbyczshop/test/index.php proxyname: (null) proxyport: 0 [Mon Mar 09 22:46:22.796851 2020] [proxy_fcgi:debug] [pid 9205] mod_proxy_fcgi.c(1002): [client ::1:59146] AH01078: serving URL fcgi://localhost//var/www/html/unihobbyczshop/test/index.php [Mon Mar 09 22:46:22.796854 2020] [proxy:debug] [pid 9205] proxy_util.c(2177): AH00942: FCGI: has acquired connection for (*) [Mon Mar 09 22:46:22.796860 2020] [proxy:debug] [pid 9205] proxy_util.c(2230): [client ::1:59146] AH00944: connecting fcgi://localhost//var/www/html/unihobbyczshop/test/index.php to localhost:8000 [Mon Mar 09 22:46:22.796884 2020] [proxy:debug] [pid 9205] proxy_util.c(2267): [client ::1:59146] AH02545: fcgi: has determined UDS as /var/run/php/php5.6-fpm.sock [Mon Mar 09 22:46:22.796946 2020] [proxy:debug] [pid 9205] proxy_util.c(2439): [client ::1:59146] AH00947: connected //var/www/html/unihobbyczshop/test/index.php to httpd-UDS:0 [Mon Mar 09 22:46:22.796965 2020] [proxy:debug] [pid 9205] proxy_util.c(2810): AH02823: FCGI: connection established with Unix domain socket /var/run/php/php5.6-fpm.sock (*) [Mon Mar 09 22:46:22.803575 2020] [proxy:debug] [pid 9205] proxy_util.c(2192): AH00943: FCGI: has released connection for (*) [Mon Mar 09 22:46:22.806190 2020] [authz_core:debug] [pid 9171] mod_authz_core.c(809): [client ::1:59150] AH01626: authorization result of Require all granted: granted [Mon Mar 09 22:46:22.806213 2020] [authz_core:debug] [pid 9171] mod_authz_core.c(809): [client ::1:59150] AH01626: authorization result of : granted [Mon Mar 09 22:46:22.806321 2020] [authz_core:debug] [pid 9171] mod_authz_core.c(809): [client ::1:59150] AH01626: authorization result of Require all granted: granted [Mon Mar 09 22:46:22.806330 2020] [authz_core:debug] [pid 9171] mod_authz_core.c(809): [client ::1:59150] AH01626: authorization result of : granted [Mon Mar 09 22:46:22.806347 2020] [proxy:debug] [pid 9171] mod_proxy.c(1229): [client ::1:59150] AH01143: Running scheme unix handler (attempt 0) [Mon Mar 09 22:46:22.806355 2020] [proxy_fcgi:debug] [pid 9171] mod_proxy_fcgi.c(995): [client ::1:59150] AH01076: url: fcgi://localhost//var/www/html/unihobbyczshop/test/index.php proxyname: (null) proxyport: 0 [Mon Mar 09 22:46:22.806361 2020] [proxy_fcgi:debug] [pid 9171] mod_proxy_fcgi.c(1002): [client ::1:59150] AH01078: serving URL fcgi://localhost//var/www/html/unihobbyczshop/test/index.php [Mon Mar 09 22:46:22.806366 2020] [proxy:debug] [pid 9171] proxy_util.c(2177): AH00942: FCGI: has acquired connection for (*) [Mon Mar 09 22:46:22.806373 2020] [proxy:debug] [pid 9171] proxy_util.c(2230): [client ::1:59150] AH00944: connecting fcgi://localhost//var/www/html/unihobbyczshop/test/index.php to localhost:8000 [Mon Mar 09 22:46:22.806379 2020] [proxy:debug] [pid 9171] proxy_util.c(2267): [client ::1:59150] AH02545: fcgi: has determined UDS as /var/run/php/php5.6-fpm.sock [Mon Mar 09 22:46:22.806466 2020] [proxy:debug] [pid 9171] proxy_util.c(2439): [client ::1:59150] AH00947: connected //var/www/html/unihobbyczshop/test/index.php to httpd-UDS:0 [Mon Mar 09 22:46:22.806502 2020] [proxy:debug] [pid 9171] proxy_util.c(2810): AH02823: FCGI: connection established with Unix domain socket /var/run/php/php5.6-fpm.sock (*) [Mon Mar 09 22:46:22.812549 2020] [proxy:debug] [pid 9171] proxy_util.c(2192): AH00943: FCGI: has released connection for (*) [Mon Mar 09 22:46:22.814859 2020] [authz_core:debug] [pid 9172] mod_authz_core.c(809): [client ::1:59154] AH01626: authorization result of Require all granted: granted [Mon Mar 09 22:46:22.814874 2020] [authz_core:debug] [pid 9172] mod_authz_core.c(809): [client ::1:59154] AH01626: authorization result of : granted [Mon Mar 09 22:46:22.814966 2020] [authz_core:debug] [pid 9172] mod_authz_core.c(809): [client ::1:59154] AH01626: authorization result of Require all granted: granted [Mon Mar 09 22:46:22.814973 2020] [authz_core:debug] [pid 9172] mod_authz_core.c(809): [client ::1:59154] AH01626: authorization result of : granted [Mon Mar 09 22:46:22.814987 2020] [proxy:debug] [pid 9172] mod_proxy.c(1229): [client ::1:59154] AH01143: Running scheme unix handler (attempt 0) [Mon Mar 09 22:46:22.814993 2020] [proxy_fcgi:debug] [pid 9172] mod_proxy_fcgi.c(995): [client ::1:59154] AH01076: url: fcgi://localhost//var/www/html/unihobbyczshop/test/index.php proxyname: (null) proxyport: 0 [Mon Mar 09 22:46:22.814998 2020] [proxy_fcgi:debug] [pid 9172] mod_proxy_fcgi.c(1002): [client ::1:59154] AH01078: serving URL fcgi://localhost//var/www/html/unihobbyczshop/test/index.php [Mon Mar 09 22:46:22.815013 2020] [proxy:debug] [pid 9172] proxy_util.c(2177): AH00942: FCGI: has acquired connection for (*) [Mon Mar 09 22:46:22.815020 2020] [proxy:debug] [pid 9172] proxy_util.c(2230): [client ::1:59154] AH00944: connecting fcgi://localhost//var/www/html/unihobbyczshop/test/index.php to localhost:8000 [Mon Mar 09 22:46:22.815027 2020] [proxy:debug] [pid 9172] proxy_util.c(2267): [client ::1:59154] AH02545: fcgi: has determined UDS as /var/run/php/php5.6-fpm.sock [Mon Mar 09 22:46:22.815080 2020] [proxy:debug] [pid 9172] proxy_util.c(2439): [client ::1:59154] AH00947: connected //var/www/html/unihobbyczshop/test/index.php to httpd-UDS:0 [Mon Mar 09 22:46:22.815102 2020] [proxy:debug] [pid 9172] proxy_util.c(2810): AH02823: FCGI: connection established with Unix domain socket /var/run/php/php5.6-fpm.sock (*) [Mon Mar 09 22:46:22.820711 2020] [proxy:debug] [pid 9172] proxy_util.c(2192): AH00943: FCGI: has released connection for (*) 

Apache conf.

 ServerName unihobbyczshop.localhost DocumentRoot /var/www/html/unihobbyczshop/test  Options Indexes FollowSymLinks   

Fail .htaccess dalam folder root.

RewriteEngine On RewriteBase / RewriteCond /var/www/html/unihobbyczshop/test/$1/$2 -f RewriteRule (bin|html|libs)/((.*)\.(htm|html|js|gif|jpg|png|css|ico|php|woff|svg|ttf|eot)$) /var/www/html/unihobbyczshop/test/$1/$2 [NC,L] RewriteRule \.(htm|html|js|gif|jpg|png|css|ico|php)$ - [NC,L] RewriteRule (tmp/backend|tmp/frontend|libs|html/templates|mods|_htaccess|_sql) - [NC,L,F] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+[^/])$ /$1/ [R=301,L,QSA,NE] RewriteCond %{HTTP_HOST} !^unihobbyczshop.localhost RewriteRule (.*) http://unihobbyczshop.localhost/$1 [R=301,QSA,L] RewriteRule ^t([a-zA-Z0-9]{32})\/$ /customer/password/?action=3&token=$1 [R=301,L,QSA,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*?)/?$ /controller.php?MRW_CONTROLLER_URI=$1&MRW_CONTROLLER_HOST=%{HTTP_HOST} [L,QSA,NC] 

Terima kasih.

Untuk mendiagnosis ini, anda perlu melihat pengalihan apa yang dikeluarkan. Saya lebih suka menggunakan curl pada baris arahan:

$ curl --head http://nihobbyczshop.localhost/ HTTP/1.1 301 Moved Permanently Location: http://nihobbyczshop.localhost/foo 

Kemudian buat permintaan lain untuk lokasi kedua:

$ curl --head http://nihobbyczshop.localhost/foo HTTP/1.1 301 Moved Permanently Location: http://nihobbyczshop.localhost/foo 

Akhirnya anda akan mendapat keadaan di mana sesuatu mengalihkan ke dirinya sendiri seperti yang ditunjukkan di sini. Atau anda boleh mendapatkan pengalihan kembali ke sesuatu yang anda minta sebelumnya.

Anda juga dapat melihat pengalihan di Firefox atau alat pembangun Chrome. Di tab "Rangkaian" harus ada pilihan "bertahan" sehingga kandungan tab tidak akan jelas antara halaman yang diarahkan. Lihat pada Pengguna Super: Bagaimana untuk mengesan pengalihan url di penyemak imbas?

bekerja untuk anda: Charles Robertson | Ingin untuk menghubungi kami?