开发者

htaccess rewrite subdomain page not found

my url is

clients.myserver.com

and i want my clients to be able to access their site by going to

clients.mysever.com/clientname

The .htaccess file located in clientname (the root of their site) i use rewrite for pretty URLs as such

RewriteEngine On
RewriteRule ^([a-zA-Z0-9-z\-]+)/([a-zA-Z0-9-z\-]+)$ index.php?page=$1&subpage=$2
RewriteRule ^([a-zA-Z0-9-z\-]+)/([a-zA-Z0-9-z\-]+)/$ index.php?page=$1&subpage=$2

RewriteRule ^([a-zA-Z0-9-z\-]+)$ index.php?page=$1
RewriteRule ^([a-zA-Z0-9-z\-]+)/$ index.php?page=$1

This .htacess file works perfectly if the folder is not located on the sub domain. In other words, if the clients folder is located at myserver.com/clientname, every thing works fine. If it is loc开发者_StackOverflowated at clients.myserver.com/clientnamem, the rewrite doesn't work.

Any help? thanks.


The fix was to comment out AllowOverride None in my apache default file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜