简体   繁体   中英

localhost refused to connect on redirect

I am trying to redesign a website and i've set up localhost with copy of the server website. But connection is refused after redirect. I have this code

<meta http-equiv="refresh" content="0; url=http://localhost/vfino/v11">

the original is

<meta http-equiv="refresh" content="0; url=http://www.vfconsult.com.pt/">

i also have this .htacces in root

RewriteEngine on


RewriteCond %{REQUEST_URI} !^/new/
RewriteCond %{REQUEST_URI} !^/imagens/
RewriteCond %{REQUEST_URI} !^/v11/
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
#RewriteRule ^(.*)$ v11/$1 [L]

RewriteEngine on
RewriteCond %{HTTP_HOST} ^vfconsult\.com\.pt$ [OR]
RewriteCond %{HTTP_HOST} ^www\.vfconsult\.com\.pt$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^/?$ "https\:\/\/www\.vfconsult\.com\.pt\/v11/$1" [R=301,L]

I've tried to change the remote url to localhost but connection still refused. I apreciate very much your help. Thanks.

如果我可以访问http://vfconsult.com.pt/它将转到localhost,但是如果我访问vfconsult.com.pt/v11/它将重定向到https://www.vfconsult.com.pt/v11/ ,即远程网站(生产)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM