I Have a Weblog Service! I had a Domain & With this domain my customer Opening their Blog. For Example : http://blogname.example.com
but when they type http://www.blogname.example.com don't open their blog.
i want my subdomain with www.subdomain.example.com redirect to subdomain.examlpe.com or ignore www !
how to set htaccess ?
Thanks,
---------------- MY htaccess Code ---------------------
- Code: Select all
RewriteEngine On
Options +Followsymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\. [NC]
RewriteCond %{REQUEST_FILENAME}!^.*/images/.*$
RewriteCond %{REQUEST_FILENAME}!^.*/uploads/.*$
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.example\.com(:80)?<>/([^/]*) [NC]
RewriteCond %1<>%3!^(.*)<>\1$ [NC]
RewriteRule ^(.*)$ - [E=BLOGUSER:%1]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^$ /index.php?w=%1 [L]
RewriteRule ^page([0-9]+)/([^/]+)?$ /index.php?w=%1&page=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^profiles/([^/]+)/([^/]+)?$ /profile.php?u=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^profiles/?$ /profile.php [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^albums/([^/]+)/([^/]+)?$ /album.php?u=$1$2 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^archive/(.*)/(.*)/([^/]+)?$ /archive.php?w=%1&y=$1&m=$2$3 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^archive/(.*)/([^/]+)?$ /archive.php?w=%1$1 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^archive/([^/]+)?$ /archive.php?w=%1$1 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^friends/([^/]+)?$ /friends.php?w=%1$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/friends/page([0-9]+)/([^/]+)?$ /friends.php?w=$1&page=$2$3 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^([0-9]+)/([^/]+)?$ /entry.php?w=%1&e_id=$1$2 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ([^/]+)^$ /index.php?w=%1$1 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^([^/]+)/([^/]+)?$ /index.php?w=%1&category=$1$2 [L]
RewriteCond %{ENV:BLOGUSER} ^(.+)$
RewriteRule ^([^/]+)/page([0-9]+)/([^/]+)?$ /index.php?w=%1&category=$1&page=$2$3 [L]