Jump to content

mcdsoftware

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by mcdsoftware

  1. Thanks so much cags! That worked beautifully
  2. Thanks cags. I tried that but it just goes into an infinite loop. I think that's because the condition that checks for the wildcard subdomain is always true and it redirects it everytime to /partners/xxx/xxx. Is there any flag that I could use to stop the loop after the first request/redirect? Thanks again.
  3. Hey guys, I've been trying out different things for several days now and have finally decided to ask for help. So here's the situation, we have a site (domain.com) and wildcard dns is setup and working properly. entering someone.domain.com displays domain.com's content so all is good there. What I need is to process a different script (note: not redirect, the url must be masked), like if the request is dummy.domain.com, it should mask the url to stay the same but really process /public_html/partners/dummy. It works as intended until I try to visit a directory like dummy.domain.com/files where it redirects the browser to domain.com/partners/dummy/files Here's what I have on public_html/.htaccess RewriteEngine On Options +FollowSymLinks RewriteBase / RewriteCond %{HTTP_HOST} !www.domain.com$ [NC] RewriteCond %{HTTP_HOST} ^([a-z0-9-]+).domain.com [NC] RewriteRule (.*) http://domain.com/partners/%1/$1 [P,L] If I try to visit a non-existent directory like dummy.domain.com/asdf, it works fine. The 404 says that it cant find the directory or file at partners/dummy/asdf so I'm thinking it must be something on the /files directory. Here's the htaccess under the files directory <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymLinks RewriteBase files/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php [L] </IfModule> Hope you guys can help me out. Thanks!
×
×
  • 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.