On Aug 29, 2008, at 3:08 AM, Krist van Besien wrote:

On Thu, Aug 28, 2008 at 17:21, Jason Pruim <[EMAIL PROTECTED]> wrote:
It is case 1 that I want. I want people to be able to type in:
HTTP://www.raoset.com/jasonpruim112 and have my script at:
HTTP://www.raoset.com/purl/purl.php?purl=jasonpruim112 take over control.

OK, than this rule:
RewriteRule  /(.*)       /purl/purl.php?purl=$1

Should do it.


I tried the rewrite rule you supplied in a .htaccess file with no luck...

Using rewrite rules in .htaccess files is tricky. If you have access
to your webserver's config (as you apparently have) it is better to
have it in your config file. Try that first.

Also add this to your config:
RewriteLog   <some logfile name>
RewriteLogLevel 9

you will then get a rewrite log showing everything that happens, which
is great for finding out problems.

Hi Krist,

Thanks for your help on this, I enabled the log to level 9 and this is what I'm getting:

127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) init rewrite engine with requested uri / server-status 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) applying pattern '/(.*)' to uri '/server- status' 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) rewrite /server-status -> /dev/ schreurprinting.com/p.php?purl=jasonpruim112 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) split uri=/dev/schreurprinting.com/p.php? purl=jasonpruim112 -> uri=/dev/schreurprinting.com/p.php, args=purl=jasonpruim112 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) applying pattern '.*' to uri '/dev/ schreurprinting.com/p.php' 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (4) RewriteCond: input='GET' pattern='^TRACE' => not-matched 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) local path result: /dev/schreurprinting.com/ p.php 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (1) go-ahead with /dev/schreurprinting.com/p.php [OK] 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) init rewrite engine with requested uri / server-status 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) applying pattern '/(.*)' to uri '/server- status' 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) rewrite /server-status -> /dev/ schreurprinting.com/p.php?purl=jasonpruim112 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) split uri=/dev/schreurprinting.com/p.php? purl=jasonpruim112 -> uri=/dev/schreurprinting.com/p.php, args=purl=jasonpruim112 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (3) applying pattern '.*' to uri '/dev/ schreurprinting.com/p.php' 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (4) RewriteCond: input='GET' pattern='^TRACE' => not-matched 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (2) local path result: /dev/schreurprinting.com/ p.php 127.0.0.1 - - [29/Aug/2008:09:14:26 -0400] [127.0.0.1/sid#1802648] [rid#1836238/initial] (1) go-ahead with /dev/schreurprinting.com/p.php [OK]

Now the jasonpruim112 works in the script. so if you load up: HTTP://www.raoset.com/dev/schreurprinting.com/p.php?purl=jasonpruim112 it pulls up my record just fine.

Any ideas on where to go? :)


And finally, read the doc:

http://httpd.apache.org/docs/2.2/rewrite/

I have been reading everything I can on the rewrite engine, it's just a very complex and confusing thing to me right now... So while I ask for help here, I am definitely reading and trying to figure things out on my own as well.

Thank you so much for your help so far!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to