logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Rewriting in .htaccess problem
Author
pau



Joined: 28 Dec 2009
Posts: 2

PostPosted: Mon 28 Dec '09 16:43    Post subject: Rewriting in .htaccess problem Reply with quote

Hello everybody.
I have the following rewrite rule in the httpd-vhosts.conf and it works fine:
Code:

RewriteEngine On
RewriteRule ^/blah/?([^/]*)/?([^/]*)/?([^/]*)/?([^/]*)/? /blah.php?arg1=$1&arg2=$2&arg3=$3&arg4=$4 [PT]

but when I try to do the same thing in .htaccess file - it does not. It does not rewrite anything at all.
I have already tested .htaccess with simple rule and it works:
Code:
RewriteRule ^ http://boo-boo.net

Can anyone tell me what am I doing wrong? Thank you very much.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7354
Location: Germany, Next to Hamburg

PostPosted: Tue 05 Jan '10 11:10    Post subject: Reply with quote

I'm not an expert in rewriting, but I think you have to delete the first slash. See the example http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritebase

If that does not help, please ask the experts on forum.modrewrite.com
Back to top
pau



Joined: 28 Dec 2009
Posts: 2

PostPosted: Sun 10 Jan '10 19:34    Post subject: Reply with quote

Yes! Thank you, James! The problem was the leading slash - in httpd-vhosts.conf it works fine, but in .htaccess it should be removed.
Thank you!!!
Back to top


Reply to topic   Topic: Rewriting in .htaccess problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache