Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 8th, 2002, 12:04 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation mod_rewrite question and help !!

I am looking to create the following system and like to know if mod_rewrite is the correct way about going about it.

When ever some enters the following members URL:

http://mydomain.com/username or http://username.mydomain.com/ I like to grab the username and parse the PHP index page under the /resumes/ directory to actually display the resume based on the username.

I have tried the following that I would think is correct but seems to not function correctly:


Rewritelog logs/rewrite.log
RewritelogLevel 9

RewriteMap lowercase int:tolower
RewriteEngine on

RewriteCond ${lowercase:%{HTTP_HOST}} !^$
RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.mydomain.com$

RewriteCond ${lowercase:%{HTTP_HOST}} ^[a-z-][-0-9]+\.mydomain\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]

RewriteRule ^([a-z-][-0-9]+)\.mydomain\.com(.*) /resumes/$1/$2 [PT]

Where am I going wrong.. Or am I using the wrong method

Reply With Quote
  #2  
Old January 8th, 2002, 02:32 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Start here -> http://forums.devshed.com/showthrea...7530&forumid=15

The only difference is the final RewriteRule line from:

RewriteRule ^([a-z-][-0-9]+)\.mydomain\.com(.*) /resumes/$1/$2 [PT]

To:

RewriteRule ^([^.]+)\.mydomain\.com(.*) /www/vhosts/$1/htdocs/resumes$2

Assuming username docroot is /www/vhosts/username/htdocs.

>> Where am I going wrong

1) !^www\.mydomain.com$ -> !^www\.mydomain\.com$

2) Specify RewriteEngine on prior to other Rewrite* lines.

3) /resumes/$1/$2 [PT] -> /server/path/to/resumes/$1$2

You do not need the extra slash before $2. You also shouldn't use [PT] (pass-thru). Using PT is to tell mod_rewrite to SKIP it when it matches but you actually want it to DO IT.

Reply With Quote
  #3  
Old January 8th, 2002, 05:23 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for getting back to me so quickly freebsd!

I changed the line that I messed up on to your suggestion, I am getting a Cannot find server error.

Apache is new for myself, and I usually have someone else do it.. And hear I am tackling mod_rewrites.

I should explain it in more detail what I am doing. I have created a site for PHP programmers to post their resumes. But instead of doing a search engine friendly script by using:

<Location /resumes>
ForceType application/x-httpd-php
</Location>

http://www.mydomain.com/resumes/tim

I wanted to get a little more fancier and offer, http://tim.mydomain.com/

my using mod_rewrite it would then take tim from the URL and point it to a script that would display their resumes.

SELECT * FROM Resumes WHERE screen_name = 'tim' which of course their is no tim directory just a directory called resumes where the actual script resides..

Sort of like the way all those profile companies do it except they grab the username at the end of the domain like the following: .com/tim

---------------------------------------------

I only other reason I can see that it failed is that my development server is WinXP - PHP4 - Apache...

Thanks Tim

Reply With Quote
  #4  
Old January 8th, 2002, 05:40 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Would this work? Or is it the above but something on my end :)

Your opinion: Would this work.. Or am I still way off...

RewriteRule ^([^.]+)\.mydomain\.com(.*)
/wwwroot/inpub/webpages/index.php?screen_name=$1

Win32??
E:/wwwroot/inpub/webpages/index.php?screen_name=$1

I hope you don't mind me asking.

Reply With Quote
  #5  
Old January 8th, 2002, 06:59 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Search engine friendly PHP using mod_rewrite has been discussed and answered dozen times. Though yours is a bit more fancier by taking the HTTP_HOST part instead of the virtual URI part.

First follow the same link I posted last time, then on the very last line, change it to:

RewriteRule ^([^.]+)\.mydomain\.com(.*) /wwwroot/inpub/webpages/index.php?screen_name=$1 [T=application/x-httpd-php,L]

Reply With Quote
  #6  
Old January 9th, 2002, 07:22 AM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Final rewrite tested! But no go!

Hi again freebsd.. Here is what I have taken and have working on my home devoplement server:

I have apache rewrite_module loaded:
LoadModule rewrite_module modules/mod_rewrite.so

And because it is my own home server where I have testing I have the following for my resume project which works until I try the re-write.

<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.wwwroot-dev-resume.com

Rewritelog logs/rewrite.log
RewritelogLevel 9
RewriteMap lowercase int:tolower
RewriteEngine on
RewriteCond ${lowercase:%{HTTP_HOST}} !^$
RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.wwwroot-dev-resume.com$
RewriteCond ${lowercase:%{HTTP_HOST}} ^[a-z-][-0-9]+\.wwwroot-dev-resume\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule ^([^.]+)\.wwwroot-dev\.com(.*) /wwwroot/resumes/index.php?profile_page=$1 [T=application/x-httpd-php,L]

DocumentRoot h:/wwwroot
</VirtualHost>

VirtualHost does have my IP address in place for my home webserver...

Project is located on my h drive under the wwwroot directory.. And under that directory is the resumes directory.

h:/wwwroot/ index.php ( main index for my project )
h:/wwwroot/resumes/ index.php ( scripting to pull the users resume template together )


------------------------------------------------------------------

If I have it correct and still have problems then it means time to send in the big boys

Which is my next question: Any one good for hire?

Tim

Reply With Quote
  #7  
Old January 9th, 2002, 01:14 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I thought I posted the link so why didn't you follow it? What isn't working right now? What does the log say?
How many <VirtualHost> do you have? Which is the default? I told you to follow (1) (2) and (3) but you didn't follow the first two.

Reply With Quote
  #8  
Old January 9th, 2002, 02:47 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Here is what I did change

I went through the steps you had mentioned.. 1 2 and 3 which includes step from http://forums.devshed.com/showthrea...7530&forumid=15

Now I am just going over it again making sure I didn't miss any thing...

Even though I have multiple Virtual Host Blocks I removed them expect for the resume project and of coarse eltered it to match you version...

To answer your questions:

I usually have 4 or more other Virtual Blocks.. ( Though removed to create your version ) Can there be more blocks for this to work?


Part Two To Follow =>

Reply With Quote
  #9  
Old January 9th, 2002, 02:49 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Part Two

Mylogs:

By going to the direct domain: www.wwwroot-dev-resume.com:

192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (2) init rewrite engine with requested uri /
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (3) applying pattern '^(.+)' to uri '/'
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (1) pass through /
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (2) init rewrite engine with requested uri /index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (3) applying pattern '^(.+)' to uri '/index.php'
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/subreq] (1) pass through /index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (2) init rewrite engine with requested uri /index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (3) applying pattern '^(.+)' to uri '/index.php'
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f2448/initial/redir#1] (1) pass through /index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (2) init rewrite engine with requested uri /php/php.exe/index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (3) applying pattern '^(.+)' to uri '/php/php.exe/index.php'
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f30e8/initial/redir#2] (1) pass through /php/php.exe/index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (2) init rewrite engine with requested uri /index.php
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (3) applying pattern '^(.+)' to uri '/index.php'
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:05 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#9014f0/subreq] (1) pass through /index.php

Part Three To Follow =>

Reply With Quote
  #10  
Old January 9th, 2002, 02:52 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Part Three

192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (2) init rewrite engine with requested uri /common/styles/common.css
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (3) applying pattern '^(.+)' to uri '/common/styles/common.css'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (1) pass through /common/styles/common.css
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (2) init rewrite engine with requested uri /common/js/common.js
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (3) applying pattern '^(.+)' to uri '/common/js/common.js'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (1) pass through /common/js/common.js
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (2) init rewrite engine with requested uri /common/js/form.js
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (3) applying pattern '^(.+)' to uri '/common/js/form.js'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (1) pass through /common/js/form.js
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (2) init rewrite engine with requested uri /images/common/bullet.gif
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (3) applying pattern '^(.+)' to uri '/images/common/bullet.gif'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8eb2d0/initial] (1) pass through /images/common/bullet.gif
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (2) init rewrite engine with requested uri /images/common/pixel.gif
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (3) applying pattern '^(.+)' to uri '/images/common/pixel.gif'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f33a0/initial] (1) pass through /images/common/pixel.gif
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (2) init rewrite engine with requested uri /images/common/bottom.gif
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (3) applying pattern '^(.+)' to uri '/images/common/bottom.gif'
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^$' => matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (5) map lookup OK: map=lowercase key=www.wwwroot-dev-resume.com -> val=www.wwwroot-dev-resume.com
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (4) RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched
192.168.1.120 - - [09/Jan/2002:15:26:06 -0500] [www.wwwroot-dev-resume.com/sid#814ed8][rid#8f1350/initial] (1) pass through /images/common/bottom.gif

Attached is my httpd.conf ( If i am still getting it wrong I am appologizing now
Attached Files
File Type: php httpd.conf.php (7.5 KB, 235 views)

Reply With Quote
  #11  
Old January 9th, 2002, 03:03 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> RewriteCond: input='www.wwwroot-dev-resume.com' pattern='!^www\.wwwroot-dev-resume.com$' => not-matched

And I mentioned this in my very first post: 1) !^www\.mydomain.com$ -> !^www\.mydomain\.com$.

You need to escape the dot at -> RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.wwwroot-dev-resume\.com$
so it matches your ! rule and go on to your 3rd condition. Right now it's passing-thru and not getting to your 3rd condition at all.

Reply With Quote
  #12  
Old January 9th, 2002, 04:06 PM
timmy timmy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 16 timmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
New Errors which I am hoping is a good thing...

I hope that with a different set of errors I am getting closer.. I went over all three steps again.. And yes I missed a few things..

If you want to give up on this I will totally understand..

New Errors:
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8df170/initial] (2) init rewrite engine with requested uri /
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8df170/initial] (3) applying pattern '^(.+)' to uri '/'
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8df170/initial] (4) RewriteCond: input='' pattern='!^$' => not-matched
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8df170/initial] (1) pass through /
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e11a8/subreq] (2) init rewrite engine with requested uri /index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e11a8/subreq] (3) applying pattern '^(.+)' to uri '/index.php'
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e11a8/subreq] (4) RewriteCond: input='' pattern='!^$' => not-matched
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e11a8/subreq] (1) pass through /index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0140/initial/redir#1] (2) init rewrite engine with requested uri /index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0140/initial/redir#1] (3) applying pattern '^(.+)' to uri '/index.php'
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0140/initial/redir#1] (4) RewriteCond: input='' pattern='!^$' => not-matched
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0140/initial/redir#1] (1) pass through /index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0c88/initial/redir#2] (2) init rewrite engine with requested uri /php/php.exe/index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0c88/initial/redir#2] (3) applying pattern '^(.+)' to uri '/php/php.exe/index.php'
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0c88/initial/redir#2] (4) RewriteCond: input='' pattern='!^$' => not-matched
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e0c88/initial/redir#2] (1) pass through /php/php.exe/index.php
192.168.1.120 - - [09/Jan/2002:16:55:10 -0500] [www.wwwroot-dev-resume.com/sid#814ed0][rid#8e31c0/subreq] (2) init rewrite engine with requested uri /index.php

Here is what I have so i do hope I did follow your step correctly:
Rewritelog logs/rewrite.log
RewritelogLevel 9

RewriteEngine on
RewriteMap lowercase int:tolower

RewriteCond ${lowercase:%{HTTP_HOST}} !^$
RewriteCond ${lowercase:%{HTTP_HOST}} !^www\.wwwroot-dev-resume\.com$

RewriteCond ${lowercase:%{HTTP_HOST}} ^[a-z-][-0-9]+\.wwwroot-dev-resume\.com$
RewriteRule ^(.+) ${lowercase:%{HTTP_HOST}}$1 [C]

RewriteRule ^([^.]+)\.wwwroot-dev-resume\.old(.*) /www.wwwroot-dev-resume.com/webpages/index.php?screen_name=$1 [T=application/x-httpd-php,L]

NameVirtualHost 192.168.1.120

<VirtualHost 192.168.1.120>
RewriteEngine on
RewriteOptions inherit
DocumentRoot "E:/www.wwwroot-dev-resume.com"
ServerName www.wwwroot-dev-resume.com
ServerAlias wwwroot-dev-resume.com
ScriptAlias /cgi-bin/ /www.wwwroot-dev-resume.com/cgi-bin/
</VirtualHost>

Reply With Quote