Linux / UNIX Tech Support Forum
This is a discussion on lighttpd redirect rules! within the Web servers forums, part of the Mastering Servers category; Hello , I want when user type : website.com > will be redirected to www.website.com/forum www.website.com > will be redirected ...
|
|||||||
| Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello ,
I want when user type : website.com > will be redirected to www.website.com/forum www.website.com > will be redirected tp www.website.com/forum so i use vbulletin with vbseo mod Quote:
Cheers. |
| Sponsored Links | ||
|
|
|
||||
|
Add the following to config and reload lighttpd (replace website.com with actual domain name)
Code:
$HTTP["host"] =~ "^website\.com$" { url.redirect = ( "^/(.*)" => "http://www.website.com/$1" ) }
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Hi mate ,
It work with adding the www but i got 404 not found with www.website.com but website.com > work redirect to > website.com/forum www.website.com return > 404 not found i've modified the code by adding ( forum ) $HTTP["host"] =~ "^website\.com$" { url.redirect = ( "^/(.*)" => "http://www.website.com/forum" ) } Without results ! But what /$1 at the end means ? |
|
||||
|
$1 will append whatever is there after website.com/url-name. For example, if you type the following
Code:
cyberciti.biz/tips/google-public-dns-servers-launched.html Code:
www.cyberciti.biz/tips/google-public-dns-servers-launched.html
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Thanks for the explication.
And for the redirection do you have idea ? Because i don't have website i have only forum then i want redirect all users to /forum $HTTP["host"] =~ "^website\.com$" { url.redirect = ( "^/(.*)" => "http://www.website.com/forum" ) } website.com > work redirect to > website.com/forum www.website.com return > 404 not found |
|
||||
|
Can you attach or paste your lighttpd.conf file? You must be doing something wrong with config file.
__________________
Vivek Gite Linux Evangelist |
|
|||
|
This is IT LOL
Quote:
|
![]() |
| Tags |
| lighttpd , lighttpd url rewrite , redirect , seo , url.redirect , url.rewrite-once |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lighttpd rewrite rules | Melnax | Web servers | 0 | 01-06-2009 01:51 PM |
| Drupal/lua rules for lighttpd | jtrudeau | Web servers | 3 | 07-09-2008 12:20 AM |
| Lighttpd Gallery2 URL Rewrite (.htaccess) SEO Rules | rootadmin | Web servers | 2 | 22-06-2008 06:57 PM |
| Redirect + Rewrite Problem in Lighttpd | Lizard King | Web servers | 4 | 17-07-2007 09:44 AM |
| redirect to www in lighttpd | muks | Web servers | 11 | 02-06-2007 10:55 PM |