V
V
Viktor Dotsenko2014-11-06 16:48:00
PHP
Viktor Dotsenko, 2014-11-06 16:48:00

The site does not work without WWW, it does not help through htaccess, what could be the matter?

The site opens in the browser if you type http://www.site.ru, and if you just type site.ru the site goes into timeout and is not loaded.
I tried to redirect through htaccess, but it doesn't work.
Did it like this:

RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]

Tried to prescribe in web.config - no result.
I think the problem is in urlwrite.php but I can't figure out what's wrong.
<?
$arUrlRewrite = array(
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/gallery/([0-9]+)#",
    "RULE"	=>	"ID=$1&SECT=$2",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/gallery2.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/gallery+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/gallery.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/sales+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/sales.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([-a-z0-9]+)/gallery/([0-9]+)#",
    "RULE"	=>	"ID=$1&SECT=$2",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/gallery2.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/genplan+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/genplan.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/map+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/map.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/genplan+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/genplan.php",
  ),
  
  
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/map+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/map.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/genplan+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/genplan.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/map+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/map.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/credit+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/credit.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/credit+([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/credit.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/gallery/([0-9]+)#",
    "RULE"	=>	"ID=$1&SECT=$2",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/gallery2.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/gallery/([0-9]+)#",
    "RULE"	=>	"ID=$1&SECT=$2",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/gallery2.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([-a-z0-9]+)/gallery+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/gallery.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([-a-z0-9]+)/sales+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/sales.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/detail.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/gallery+/*[\s\S]*#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/gallery.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/gallery+/*[\s\S]*#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/gallery.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([-a-z0-9]+)/map+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/map.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/credit+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/credit.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/credit+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/credit.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/credit+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/credit.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/sales+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/sales.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/sales+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/sales.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/gallery+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/gallery.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/detail.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/detail.php",
  ),	
  
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/genplan+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/genplan.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)/map+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/map.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/genplan+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/genplan.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)/map+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/map.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/sales+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/sales.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects/([-a-z0-9]+)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/house-projects1/detail.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects/([^\\?]*)([\\s\\S]*)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/detail.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/genplan+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/genplan.php",
  ),
  
  array(
    "CONDITION"	=>	"#^/projects/([-a-z0-9]+)/map+#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/projects1/map.php",
  ),	
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy/([-a-z0-9]+)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/livecomplex/detail.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses/([-a-z0-9]+)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/townhouses1/detail.php",
  ),

  array(
    "CONDITION"	=>	"#^/press/(\\w+)/([0-9]+)#",
    "RULE"	=>	"SECTION=$1&ID=$2",
    "ID"	=>	"",
    "PATH"	=>	"/press1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/testimonial#",
    "PATH"	=>	"/about1/a_replies.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/partners#",
    "PATH"	=>	"/about1/a_partners.php",
  ),
  array(
    "CONDITION"	=>	"#^/career/vacancy#",
    "PATH"	=>	"/career1/vacancy.php",
  ),
  array(
    "CONDITION"	=>	"#^/house-projects#",
    "PATH"	=>	"/house-projects1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/archieve#",
    "PATH"	=>	"/about1/a_archieve.php",
  ),
  array(
    "CONDITION"	=>	"#^/kaskad-service#",
    "PATH"	=>	"/newpages/otdelka.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/archive#",
    "PATH"	=>	"/about1/a_achieve.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/company#",
    "PATH"	=>	"/about1/a_company.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/leaders#",
    "PATH"	=>	"/about1/a_leaders.php",
  ),
  array(
    "CONDITION"	=>	"#^/news/([0-9]+)#",
    "RULE"	=>	"ID=$1",
    "ID"	=>	"",
    "PATH"	=>	"/news/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/social#",
    "PATH"	=>	"/about1/a_social.php",
  ),
  array(
    "CONDITION"	=>	"#^/about/awards#",
    "PATH"	=>	"/about1/a_awards.php",
  ),
  array(
    "CONDITION"	=>	"#^/press/(\\w+)/#",
    "RULE"	=>	"SECTION=$1",
    "ID"	=>	"",
    "PATH"	=>	"/press1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/career/work#",
    "PATH"	=>	"/career1/work.php",
  ),
  array(
    "CONDITION"	=>	"#^/press/(\\w+)#",
    "RULE"	=>	"SECTION=$1",
    "ID"	=>	"",
    "PATH"	=>	"/press1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/zhilye-kompleksy#",
    "PATH"	=>	"/livecomplex/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/townhouses#",
    "PATH"	=>	"/townhouses1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/contacts#",
    "PATH"	=>	"/contacts1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/projects#",
    "PATH"	=>	"/projects1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/career#",
    "PATH"	=>	"/career1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/press#",
    "PATH"	=>	"/press1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/about#",
    "PATH"	=>	"/about1/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/map#",
    "PATH"	=>	"/map/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/map/#",
    "PATH"	=>	"/map/index.php",
  ),
  array(
    "CONDITION"	=>	"#^/([^?]*)([\\s\\S]*)#",
    "RULE"	=>	"CODE=$1",
    "ID"	=>	"",
    "PATH"	=>	"/pages1/index.php",
  ),
);

?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2014-11-06
@V1rTu

Is there an A-record for site.ru (without www) in DNS?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question