If you want to redirect visitors that access your website without the ‘www’, you can use mod_redirect with the following syntax:
$HTTP[”host”] =~ “^lescampeurs\.org” {
url.redirect = (
”^/(.*)$” => “http://www.lescampeurs.org/$1″
)
}
Links:
Comments (3)
Thanks for the tips,
just to notice, if you like more redirection you need to use +=
example:
$HTTP[”host”] =~ “^lescampeurs\.org” {
url.redirect = (
”^/(.*)$” => “http://www.lescampeurs.org/$1″
)
url.redirect += (
”/oldpage/shall/301/redirect” => “http://www.lescampeurs.org/newpage″
)
}
Thanks for this one, didn’t know it
There’s an easier way to do multiple redirects: Just comma separate them!
$HTTP[”host”] =~ “^lescampeurs\.org” {
url.redirect = (
”^/(.*)$” => “http://www.lescampeurs.org/$1″,
”/oldpage/shall/301/redirect” => “http://www.lescampeurs.org/newpage″
)
}