Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Apache to Lighttpd

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
UriyZenkov
Posts: 57
Joined: 2009-09-21 13:53
Location: Ukraine, Cherkassion region, town Smila

Apache to Lighttpd

#1 Post by UriyZenkov »

How to convert Apache redirect to redirect Lighttpd?

Code: Select all

RewriteEngine On

RewriteBase /
RewriteRule ^news/(.*)/(.*)$ news/$1 [R=301,L]

#Redirect  www to without www
RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=35]

#Redirect to html
REDIRECTMATCH 301 (.*/[^/.]+)($|\?)$ http://site.com$1.html

#Redirect  htm to html
RewriteCond %{REQUEST_URI} \.htm$
RewriteRule ^(.*) %{REQUEST_URI}l [R=301,L]
RewriteRule ^.+$ index.php?$1 [QSA,L]

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Apache to Lighttpd

#2 Post by andre@home »


UriyZenkov
Posts: 57
Joined: 2009-09-21 13:53
Location: Ukraine, Cherkassion region, town Smila

Re: Apache to Lighttpd

#3 Post by UriyZenkov »

andre@home wrote:https://www.packtpub.com/books/content/ ... e-lighttpd
a table of comparison is given....
Thanks
I decided:

Code: Select all

url.redirect = (
 "(.*)/2016(.*)$" => "$1.html",
"(.*)/2015(.*)$" => "$1.html",
"(.*)/2014(.*)$" => "$1.html",
"(.*)/2013(.*)$" => "$1.html",
"news/komedii/1-0-1" => "/komedii.html",
"news/multiki/1-0-2" => "/multiki.html",
)
This decission very stupped, but its working :D

UriyZenkov
Posts: 57
Joined: 2009-09-21 13:53
Location: Ukraine, Cherkassion region, town Smila

Re: Apache to Lighttpd

#4 Post by UriyZenkov »

But I don't know, does the web server 301 redirection or not.

Post Reply