Forum Moderators: phranque
example: sub.mydomain.com will throw me a internal server error.
If I cancel out/eliminate the .htaccess then accessing the subdomain is fine. So this tells me it's something with the root .htaccess
Is there something to add to the .htaccess file so the subdomain will work properly?
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\. [NC]
RewriteRule ^(.*)$ [%{HTTP_HOST}...] [R,L]
Any help is appreciated. Thanks!
<IfModule mod_rewrite.c>
#
RewriteEngine on
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^[i]your-subdomain-name[/i]\. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [[b]R=301[/b],L]
#
# BEGIN WordPress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
#
</IfModule>
# BEGIN WordPress
RewriteCond $1 !^index\.php$
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule (.+) /index.php [L]
# END WordPress
Jim
I have somewhat similar problem as agentvic but the difference is I have multiple wordpress running in different directories. And for each of the wordpress directory i would like to assign a sub-domain.
For example:
wp1.mydomain.com (points to public_html/wp1 directory)
wp2.mydomain.com (points to public_html/wp2 directory)
Any helps is greatly appreciated.
Thanks.
Shah