I want to show user's mini-website on the server by creating dynamic subdomains.
The re-write rule is written as below:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourwebsite.com
RewriteCond %{HTTP_HOST开发者_Go百科} ([^.]+)\.yourwebsite.com
RewriteRule ^(.*)$ /path_to_your_site/public_html/app/test/home.php?url=%1
In the home.php page the web.css file is included as shown below:
But the CSS is not getting applied on home.php page due to css file path problem.
I would suggest using another subdomain for those files, for example static.yourwebsite.com
.
If I am not mistaken, you would then have to add this line to your .htaccess file:
RewriteCond %{HTTP_HOST} !^static\.yourwebsite.com
精彩评论