Jump to content

[SOLVED] Subdomain > Directory Problem


Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/168036-solved-subdomain-directory-problem/
Share on other sites

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 :P

 

Thanks I'll give it a shot

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.