2016-03-26 37 views
0
domain => subdomain.domain.com 
target => subdomain.domain.com/Controller/Method 

(alan adı baz alan adı ise) I willalt klasöre yönlendirmek Htaccess

IF %{HTTP_HOST} == base_url(subdomain.domain.com) 

I (subdomain.domain.com/Controller/Method) hedef yönlendirme baz etki alanı adı düzeltmek değil

cevap

0

Dene:

# Considering that base domain URL excludes index.html, index.php, welcome.html or something like that, we'll reduce matches to http(s)://base.subdomain/ and http(s)://base.subdomain 
RewriteCond %{REQUEST_URI} ^\/?$ 
RewriteRule /Controller/Method 
0

Aşağıdaki kuralı kullanabilirsiniz:

RewriteEngine on 

##IF host==subdomain.domain.com## 
RewriteCond %{HTTP_HOST} ^sudomain\.domain\.com$ 
##And uri==/## 
RewriteCond %{REQUEST_URI} ^/$ 
##redirect to http://subdomain.domain.com/Contreller/method## 
RewriteRule^http://subdomain.domain.com/Controller/method [NC,L,R] 
İlgili konular