Re: [users@httpd] rewrite rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/23/06, Om <omprakash@xxxxxxxxxxxx> wrote:
Hi,
I am also new to this.
Can you check the following rule

RewriteEngine On
RewriteRule ^/(.*)  http://host/script.php?p=$1

I think, what ever is there after the hostname will be $1
for ex:
http://abcd.com/pets
$1 will be pets.

correct.

Rewrite rules are applied to the URL _without_ the hostname.

In this case to:
/pets

This gets matched like this:

/(pets)

and thus $1 is "pets"

Krist

--
krist.vanbesien@xxxxxxxxx
Solothurn, Switzerland

---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux