DNS error with Dynamic subdomains with htaccess

我的未来我决定 提交于 2020-01-11 13:01:13

问题


i'm trying to implement dinamics subdomains for cityes, but this not work when a subdomain is used. My htaccess is:

Options +FollowSymlinks

<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www.bisnet.com.co [NC]
RewriteRule ^(.*)$ http://bisnet.com.co/$1 [R=301,L]
</IfModule>

<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www.bisnetcolombia.com [NC]
RewriteRule ^(.*)$ http://bisnet.com.co/$1 [R=301,L]
</IfModule>

<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www.bisnet.co [NC]
RewriteRule ^(.*)$ http://bisnet.com.co/$1 [R=301,L]
</IfModule>

<IfModule mod_rewrite.c>
# Activar RewriteEngine

RewriteEngine on
RewriteBase / 
#RewriteCond %{SCRIPT_FILENAME} !-d
#RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{HTTP_HOST} !^www\.bisnet\.com\.co
RewriteCond %{HTTP_HOST} ([^.]+)\.bisnet\.com\.co
Rewriterule ^([0-9]+)\-([a-zA-Z0-9_]*)/([0-9]+)\-([a-zA-Z0-9_]*) http://bisnet.com.co/index.php?categoria=$1&empresa=$3&ciudad=%1

RewriteCond %{HTTP_HOST} !^www\.bisnet\.com\.co
RewriteCond %{HTTP_HOST} ([^.]+)\.bisnet\.com\.co
Rewriterule ^([0-9]+)\-([a-zA-Z0-9-]*) http://bisnet.com.co/index.php?categoria=$1&ciudad=%1

RewriteCond %{HTTP_HOST} !^www\.bisnet\.com\.co
RewriteCond %{HTTP_HOST} ([^.]+)\.bisnet\.com\.co
Rewriterule ^letra/([^/.]+) http://bisnet.com.co/index.php?categorias=$1&ciudad=%1

RewriteCond %{HTTP_HOST} !^www\.bisnet\.com\.co
RewriteCond %{HTTP_HOST} ([^.]+)\.bisnet\.com\.co
Rewriterule ^buscar/(.+) http://bisnet.com.co/index.php?q=$1&ciudad=%1

Rewriterule ^nosotros/(.+) http://bisnet.com.co/index.php?interna=$1

RewriteCond %{HTTP_HOST} !^www\.bisnet\.com\.co
RewriteCond %{HTTP_HOST} ([^.]+)\.bisnet\.com\.co
RewriteRule ^ http://bisnet.com.co/index.php?ciudad=%1
</IfModule>

In http://htaccess.madewithlove.be/ the test appear work fine, but in my server y get the error: ERR_NAME_NOT_RESOLVED

the url's to test are:

http://bucaramanga.bisnet.com.co/
http://bucaramanga.bisnet.com.co/letra/a
http://bucaramanga.bisnet.com.co/166-restaurantes
http://bucaramanga.bisnet.com.co/166-restaurantes/355-la_casona_del_chingo

Thanks for the help.

来源:https://stackoverflow.com/questions/32133016/dns-error-with-dynamic-subdomains-with-htaccess

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!