[Solved] .htaccess to lighttpd url rewrite
Added by Luke about 11 years ago
Hello!
Lighttpd newbie here, was wondering if anyone could rewrite this so it is compatible with my lighttpd rewrite rules
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
I need this .htaccess (httpd) to work with lighttpd rules!
Thanks!
Replies (2)
RE: .htaccess to lighttpd url rewrite - Added by szogunek almost 11 years ago
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
means
$HTTP["host"] =~ "^www\.(.*)" {
url.redirect = ( "^/(.*)" => "http://%1/$1" )
}
and
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
means
url.rewrite-once = (
"^/(.+)$" => "/index.php?url=$1"
)
should work
RE: [Solved] .htaccess to lighttpd url rewrite - Added by gstrauss about 8 years ago
See also https://redmine.lighttpd.net/boards/2/topics/6459 for another example