httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [users@httpd] rewrite help
Date Tue, 04 Nov 2008 01:39:22 GMT
I am trying to get a redirect to work so that I can get friendl URLs for
my website. I am using mod_perl and have written a little handler as a
controler to handle all requests.

What I currently have that works as follows.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wc/(.*) /wc\?uni=$1 [L]

The user types in:
and apache rewrites:

Where /wc is my perl handler, as such:

PerlModule Examplepackage::WC
<Location /wc>
        SetHandler perl-script
        PerlResponseHandler Examplepackage::WC

This works and it's great, but I want to work just a little different.

I want the user to type in:
and apache rewrite:

I have tried a few different RewriteRule types and either they 404 or
it exceedes 10 internal redirects (internal server error).

I have tried:

RewriteRule ^/(.*) /wc\?uni=$1 [L]
RewriteRule ^(.*) /wc\?uni=$1 [L]
RewriteRule /(.*) /wc\?uni=$1 [L]
RewriteRule . /wc\?uni=$1 [L]
RewriteRule /(.*)$ /wc\?uni=$1 [L]

and other such permutations.

What am I doing wrong?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message