Re: [users@httpd] Small rewrite problem

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

 



On 1/22/06, ifz 77i <ifz77i@xxxxxxxxxxxxxx> wrote:
> URL:
> http://www3/a.php?b=moo
>
> Error:
> 404 Not Found
> The requested URL /a.php was not found on this server.
>
> .htaccess contents:
> RewriteEngine On
> RewriteRule ^/*a\.php\?b=(.*)$ /b.php?a=$1

>  (3) [per-dir
> /home/mick/sites/www3/htdocs/] applying pattern '^/*a\.php\?b=(.*)$'
> to uri 'a.php'

As this log line shows, and as the docs discuss in a big box marked
"Query String", RewriteRules do not match against the query string. 
You need something more like:

RewriteCond %{QUERY_STRING} ^b=(.*)$
RewriteRule a\.php /b.php?%1

Joshua.

---------------------------------------------------------------------
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