therealwesfoster Posted July 29, 2009 Share Posted July 29, 2009 For some reason, $1 is always blank. (Wildcards are on, and all that) RewriteCond %{HTTP_HOST} ^pages\.domain\.com [NC] RewriteRule (.*?) pages/$1 [L] The main page shows up, but things like http://pages.domain.com/style/style.css does not load. What could be wrong with the code? Wes Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/ Share on other sites More sharing options...
dreamwest Posted July 30, 2009 Share Posted July 30, 2009 Make css and images ...everything thats included, a full url http://site.com/style.css Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-886613 Share on other sites More sharing options...
therealwesfoster Posted July 30, 2009 Author Share Posted July 30, 2009 Make css and images ...everything thats included, a full url http://site.com/style.css Ok. That's what I normally do when building a site from scratch, I don't know why I didn't think of doing that with this WP Thanks I'll give it a shot Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-886846 Share on other sites More sharing options...
lifetalk Posted July 30, 2009 Share Posted July 30, 2009 Or you could do this: RewriteCond %{REQUEST_FILENAME} !-f The above rewritecondition basically checks to see whether the url being requested is a physical file or not (style.css). If it is a physical file, it will not apply the rule. If not, it will. Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-886851 Share on other sites More sharing options...
therealwesfoster Posted July 30, 2009 Author Share Posted July 30, 2009 Or you could do this: RewriteCond %{REQUEST_FILENAME} !-f The above rewritecondition basically checks to see whether the url being requested is a physical file or not (style.css). If it is a physical file, it will not apply the rule. If not, it will. Worked like a charm! Thanks to both of you Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-886854 Share on other sites More sharing options...
lifetalk Posted July 31, 2009 Share Posted July 31, 2009 You're welcome Mark topic as solved ? Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-887558 Share on other sites More sharing options...
therealwesfoster Posted July 31, 2009 Author Share Posted July 31, 2009 You're welcome Mark topic as solved ? XD, I used to get on to people for not marking a topic as solved, and here I am NOT doing it.. haha. Solved Quote Link to comment https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/#findComment-887599 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.