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

Re: lighttpd redirect rules



Making them static is bad.

The Apache .htaccess is as follow, can you translate them to lighttpd?

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com
RewriteRule ^(.*) http://www.example.com/pages/page.php?u=%1 [R=301,L]



> On Mon, 19 Jul 2010 19:00:58 +0800, vinboy wrote:
>
>> Thanks for the reply. But it's not quite what I'm looking for. The
>> abc123 is a variable.
>
> Oh. And you thought people should have guess that "abc123" was a variable
> value without further notice >;-)
>
>> I'm looking for a rule that redirect this:
>>
>> http://abc123.example.com  to
>> http://www.example.com/pages/page.php?u=abc123
>>
>> http://111.example.com  to
>> http://www.example.com/pages/page.php?u=111
>>
>> http://222.example.com  to
>> http://www.example.com/pages/page.php?u=222
>>
>> http://david.example.com  to
>> http://www.example.com/pages/page.php?u=david
>>
>> you see the pattern?
>>
>> http://[name].example.com  to
>> http://www.example.com/pages/page.php?u=[name]
>
> I don't see anything wrong with that setup? :-?
>
> You can have as many redirections as you like. Just make them static,
> because OTOH, you'll have to use a static value, at least for the host
> part.
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> Archive: pan.2010.07.19.12.49.21@gmail.com">http://lists.debian.org/pan.2010.07.19.12.49.21@gmail.com
>
>



Reply to: