RewriteCond backreference not working
If I go to http://www.example.com
, I want it to stay there and it works great.
If I go to http://bar.example.com
it redirects to http://www..com
, which is not correct. I want to jump to http://www.example.com
given backlink inRewriteCond
RewriteEngine On RewriteCond% {HTTP_HOST}! ^ $ RewriteCond% {HTTP_HOST}! ^ Www. (Example) .com [NC] RewriteRule ^ (. *) Http: //www.%1.com/$1 [L, R]
Ubuntu 8.04
Package: apache2-mpm-prefork
Architecture: i386
Version: 2.2.8-1
+2
source to share
2 answers