|
Home > Archive > Apache Server configuration support > September 2005 > Mod_rewrite and subdomains?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Mod_rewrite and subdomains?
|
|
| lists@lastisfirst.org 2005-09-28, 6:04 pm |
| Howdy --
I hoping someone can help me understand what his .htaccess file below
does. I know it has to do with creating virutal sites with a CMS I'm
using, but I not sure how it rewrites the URL:
For instance:
/iziContent1/ # application root, default site
/iziContent1/sites/bebop # second site configured with CMS
Does the .htacess go in /
How will the bebop URL be rewritten.
http://bebop.mysite.com
Tia,
David
RewriteEngine on
RewriteBase
RewriteCond %{REQUEST_URI}
/iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
RewriteRule ^(.*) vscms.php?Site=%1&p1=%2&p2=%3&p3=%4 [L]
RewriteCond %{REQUEST_URI}
/iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
RewriteRule ^(.*) vscms.php?Site=%1&p1=%2&p2=%3 [L]
RewriteCond %{REQUEST_URI}
/iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
RewriteRule ^(.*) vscms.php?Site=%1&p1=%2 [L]
RewriteCond %{REQUEST_URI} /iziContetent1/([A-Za-z0-9_]*)$
RewriteRule ^(.*) vscms.php?Site=%1 [L]
RewriteCond %{REQUEST_URI} /ezc$
RewriteRule ^(.*) index.php
| |
| Justin Koivisto 2005-09-28, 6:04 pm |
| lists@lastisfirst.org wrote:
> I hoping someone can help me understand what his .htaccess file below
> does. I know it has to do with creating virutal sites with a CMS I'm
> using, but I not sure how it rewrites the URL:
<snip>
> RewriteEngine on
> RewriteBase
> RewriteCond %{REQUEST_URI}
> /iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
> RewriteRule ^(.*) vscms.php?Site=%1&p1=%2&p2=%3&p3=%4 [L]
Any URI that starts with /iziContetent1/ and has exactly 4 other path
parts to it will request the script as (Using
/iziContetent1/part1/part2/part3/part4):
vscms.php?Site=part1&p1=part2&p2=part3&p3=part4
> RewriteCond %{REQUEST_URI}
> /iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
> RewriteRule ^(.*) vscms.php?Site=%1&p1=%2&p2=%3 [L]
Any URI that starts with /iziContetent1/ and has exactly 3 other path
parts to it will request the script as (Using
/iziContetent1/part1/part2/part3):
vscms.php?Site=part1&p1=part2&p2=part3
> RewriteCond %{REQUEST_URI}
> /iziContetent1/([A-Za-z0-9_]*)/([A-Za-z0-9_]*)$
> RewriteRule ^(.*) vscms.php?Site=%1&p1=%2 [L]
Any URI that starts with /iziContetent1/ and has exactly 2 other path
parts to it will request the script as (Using /iziContetent1/part1/part2):
vscms.php?Site=part1&p1=part2
> RewriteCond %{REQUEST_URI} /iziContetent1/([A-Za-z0-9_]*)$
> RewriteRule ^(.*) vscms.php?Site=%1 [L]
Any URI that starts with /iziContetent1/ and has exactly 1 other path
part to it will request the script as (Using /iziContetent1/part1):
vscms.php?Site=part1
> RewriteCond %{REQUEST_URI} /ezc$
> RewriteRule ^(.*) index.php
Requests for "/ezc" are redirected to index.php
*******
By the looks of what you have there, bebop.mysite.com isn't rewritten
with mod_rewrite... The only things that are rewritten have
"/iziContetent1" or "/ezc" in the Request URI. "http://bebop.mysite.com"
has a request uri of "/"
My guess is there are some RewriteCond's that deal with %{HTTP_HOST} or
there are some VirtualHost containers that have this information...
HTH
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
|
|
|
|
|