Forum Moderators: phranque
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}!^example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I think the problem is related to this .htaccess file as it disappears when I delete it. But I need to keep the file to use a custom permalink structure for wordpress.
The Problem: I create any subdomain, say xample.example.com(try it on your web browser). The address bar reads example.com/xample when I try to visit test.example.com. I want to retain xample.example.com in the web browser's address bar. I don't want to use domain masking(it isn't there in CPanel anyway).
Please can you tell me what to do?
[edited by: jatar_k at 3:40 pm (utc) on June 1, 2007]
[edit reason] please use example.com [/edit]
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Jim