Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Rewriting in .htaccess problem |
|
Author |
|
pau
Joined: 28 Dec 2009 Posts: 2
|
Posted: Mon 28 Dec '09 16:43 Post subject: Rewriting in .htaccess problem |
|
|
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
|
|
Back to top |
|
pau
Joined: 28 Dec 2009 Posts: 2
|
Posted: Sun 10 Jan '10 19:34 Post subject: |
|
|
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 |
|
|
|
|
|
|