htaccess redirect in subdomain

I am created a sub domain www.support.rdmac.org.uk which works fine except that it has no styling. Having looked at several forums it seems like the browser needs to be directed towards the domain name for .css files.

At present it is:

"link rel="stylesheet" type="text/css" media="all" href="http://www.support.rdmac.org.uk/wp-content/themes/twentyten/style.css" /".

I think it should be:

"link rel="stylesheet" type="text/css" media="all" href="http://www.rdmac.org.uk/wp-content/themes/twentyten/style.css" /"

I have created an .htaccess file in my subdomain folder and used the following code

RewriteEngine on
RewriteRule ^themes/twentyten/style.css$ http://www.rdmac.org.uk/wp-content/themes/twentyten/style.css[L]

This is not working. Can anyone help?


If the htaccess is at the top level of your subdomain, perhaps you could add 'wp-content/' to the start of the rule. Formally the end should be " [R,L]", but I understand the R for rewrite is assumed when apache sees an external URL in the rewrite target.

RewriteRule ^wp-content/themes/twentyten/style.css$ http://www.rdmac.org.uk/wp-content/themes/twentyten/style.css [L]

Update:

However I see that your support subdomain appears to be using nginx. If this is the case then I think you need to look at how you configure nginx redirects instead of apache style htaccess directives on this server.

链接地址: http://www.djcxy.com/p/66078.html

上一篇: css从远程node.js添加,但不适用于html页面

下一篇: htaccess在子域中重定向