Sub Domain URL Redirect

Alles, was den Apache betrifft, kann hier besprochen werden.

Sub Domain URL Redirect

Postby amulrajesh » 06. June 2012 06:41

Dear All,

I have issues while rewrite cond checking for sub domains. i have a domain name example.com and sub domains csk.example.com and kfc.example.com.

Using godaddy i have pointing ip address with forward masking to sub domains.

Whenever i type csk.exmaple.com in url, the apache rewrite condition checks ip address instead of checking csk.example.com.

Here i have place my actual code and rewrite log

ServerName www.example.com
ServerAlias *.example.com
RewriteEngine on
RewriteLog /var/tlog/apachelog.txt
RewriteLogLevel 5
RewriteCond %{HTTP_HOST} ^(www\.)?(m\.)?([a-z0-9-]+\.)?example\.com [NC]

RewriteRule ^(/customer/)?(.*) $1 [L,QSA,PT]

On type http://csk.example.com/els/ re write log :::
122.184.224.50 - - [06/Jun/2012:05:39:43 +0000] [185.75.235.259/sid#7fd64c679298][rid#7fd64ca24c18/initial] (2) init rewrite engine with requested uri /els/img/landing-background-bottom.jpg
122.184.224.50 - - [06/Jun/2012:05:39:43 +0000] [185.75.235.245/sid#7fd64c679298][rid#7fd64ca24c18/initial] (3) applying pattern '^(/customer/)?(.*)' to uri '/els/img/landing-background-bottom.jpg'
122.184.224.50 - - [06/Jun/2012:05:39:43 +0000] [185.75.235.245/sid#7fd64c679298][rid#7fd64ca24c18/initial] (2) rewrite '/els/img/landing-background-bottom.jpg' -> '/els/img/landing-background-bottom.jpg?mobile=&entity=&customer=cust'
amulrajesh
 
Posts: 1
Joined: 06. June 2012 06:25
XAMPP Version: 5.6.3
Operating System: Linux, Windows

Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests