无限的子域名

时间:2014-02-25 17:20:18

标签: .htaccess url subdomain wildcard-subdomain rewriting

我目前正在建立一个网上商店系统,正在考虑为这些用户制作子域名。正如我过去几次所做的那样,我开始使用相同的代码,但由于某种原因,它没有成功。也许有人在这里可以阐明mistaOptions + FollowSymLinks

Options +Indexes 
RewriteEngine On 
RewriteBase /

RewriteCond %{HTTP_HOST} ^(www.)?testserver.com$
RewriteRule ^(/)?$ ee [L]

RewriteCond %{HTTP_HOST} !www.testserver.com$ [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+).testserver.com [NC]
RewriteCond %{REQUEST_URI} !^index.php/ [NC]
RewriteRule (.*) http://www.testserver.com/Webshops/index.php/store_example/%1/$1 [P,L]

我希望子域名重定向到某个地方并添加其后的所有内容,例如: testme.testserver.com/products/product-1将是网址,但会显示http://www.testserver.com/Webshops/index.php/store_example/product/product-1

谁知道我哪里出错了?

0 个答案:

没有答案
相关问题