0

In my .htaccess what would I have to put in it to basically create a wildcard so if anyone accesses www.*.domain.co.nz it will redirect to http://*.domain.co.nz.

I can get it working for one domain but then I clicked what about the others.

At this stage I have an index.html being a hold page but I would also like to be able to access wordpress's index.php

I am using the standard MU .htaccess

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
4

1 回答 1

0

你有没有尝试过:

RewriteCond %{HTTP_HOST} ^(www\.)(.*)$ [NC]
RewriteRule ^(.*)$ http://%2/$1 [L,R=301]

您需要将其放在RewriteBase /您的 htaccess 文件中。

于 2012-10-04T20:54:22.063 回答