Hello.
I have changed from Apache to Lighttpd..
so how can I use mod_rewrite on LIghttpd?
or how can I Disable Directory listings on it?
How can I convert this .htaccess to the Lighttpd?
anyone can Help?
Please I need it.
RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on
Options -Indexes
MattF 11-04-2010, 05:48 PM To disable directory listings, add this line to your conf file:
dir-listing.activate = "disable"
The rewrite rules go along the form of, (you'll need to add the remaining ones yourself):
url.rewrite-once = (
"^index\.html$" => "/index.php?mdrw=on",
"^manual\.html$" => "/index.php?action=manual&mdrw=on",
)
Thanks..
but can you tell me in what kind of file I save them?
lighttpd.conf ?
I did it but it won't work on my side..
could you please explain for me how can I create and where can I put that file.
thanks :thumbsup:
MattF 11-04-2010, 06:56 PM Put those in your default lighttpd.conf file which was installed. You need to restart the httpd daemon for the changes to take effect.
DrDOS 11-04-2010, 09:40 PM Put those in your default lighttpd.conf file which was installed. You need to restart the httpd daemon for the changes to take effect.You may even have to restart your system. In the installation on my machine changes only take effect on a full restart.
MattF 11-05-2010, 12:20 PM Does a kill and restarting it not work? Sounds like one of your rc scripts might be trying a soft restart using that angel thingy that Lighttpd have, or possibly using HUP.
To disable directory listings, add this line to your conf file:
dir-listing.activate = "disable"
The rewrite rules go along the form of, (you'll need to add the remaining ones yourself):
url.rewrite-once = (
"^index\.html$" => "/index.php?mdrw=on",
"^manual\.html$" => "/index.php?action=manual&mdrw=on",
)
when I put :
dir-listing.activate = "disable"
and restart lighttpd it works..
but when I add url.rewrite..
it won't work at all.. when I restart the site won't open.
but it just work with disabling url
so what's the problem?
MattF 11-05-2010, 02:51 PM so what's the problem?
Only you can find that out. You may not have the rewrite module installed, there may be a syntax error etc. There is documention on the Lighttpd site:
http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs
Mod_rewrite is active on it.. but it just work with disabling directory listing..
with mod_rewrite won't work..
it's the code in apache server .htaccess
RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on
Please I need it in my side to get work..
Thanks :thumbsup:
How about NginX server? maybe I change to it?
what do you think guys?
MattF 11-06-2010, 02:38 PM Personally I think that if you can't be arsed to read documentation and apply the content to your needs, you'll be buggered no matter which HTTPD server you try.
Personally I think that if you can't be arsed to read documentation and apply the content to your needs, you'll be buggered no matter which HTTPD server you try.
How about if I user nginx what kind of mod_rewrite convert code from .htaccess I user and where exactly I put them?
how could I convert this to NginX mod_rewrite?
RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3&mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on
Thanks
MattF 11-06-2010, 09:01 PM http://nginx.org/en/docs/
Thanks, but I didn't know how to convert this mod_rewrite for nginx :(
and how can we Disable Directory Listing in nginx ?
if anyone know this two please help me on this.
thanks :thumbsup:
MattF 11-07-2010, 06:21 PM http://nginx.org/en/docs/howto.html
http://wiki.nginx.org/Configuration
|