Hello there,
I am setting up a new server which are running lighttpd. I am having a
bit of a problem migrating my .htaccess file though.
---
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9+_\-\.]+)/?$ ./index.php?a=$1 [L,NS,QSA]
---
I tried something like this
url.rewrite-once = (
"^/(.*)/$" => "/index.php?a=$1"
)
but nothing changes.
Any help is much appriciated.
on 16.02.2008 21:08
on 18.02.2008 12:09
Problem solved. A friend provided me with the necessary code:
url.rewrite-once = (
"^\/(images|javascript|style)(.*)$" => "$0",
"^(((\/)([^\/^\?]*)){0,1})(((\?)(.*)){0,1})$" =>
"index.php?a=$4&$8"
)
on 02.03.2008 20:27
Kristian Andersen wrote: > Problem solved. A friend provided me with the necessary code: > > url.rewrite-once = ( > "^\/(images|javascript|style)(.*)$" => "$0", > "^(((\/)([^\/^\?]*)){0,1})(((\?)(.*)){0,1})$" => > "index.php?a=$4&$8" > ) i have this code: <Files *.mfh> order allow,deny deny from all </Files> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ index.php?file=$1 [L] can you ask him whether he also gets out (google translate) Greetz Eddy
on 22.05.2008 12:01
in the first part, you find all the file that the person want to not rewrite in the second part, you find the redirection to the index.php you just have to adapt to your code Eddy Miller wrote: > Kristian Andersen wrote: >> Problem solved. A friend provided me with the necessary code: >> >> url.rewrite-once = ( >> "^\/(images|javascript|style)(.*)$" => "$0", >> "^(((\/)([^\/^\?]*)){0,1})(((\?)(.*)){0,1})$" => >> "index.php?a=$4&$8" >> ) > > > i have this code: > > <Files *.mfh> > order allow,deny > deny from all > </Files> > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-d > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^([^/]+)/?$ index.php?file=$1 [L] > > can you ask him whether he also gets out (google translate) > > Greetz > Eddy
on 22.05.2008 12:04
mumuri wrote: note that is you dont want to bother, you can just redirect all unexisting files to index.php via a 404 error not found. server.error-handler-404 = "/" http://trac.lighttpd.net/trac/wiki/server.error-handler-404Details
on 24.05.2008 14:06
mumuri wrote: > mumuri wrote: > > note that is you dont want to bother, you can just redirect all > unexisting files to index.php via a 404 error not found. > > server.error-handler-404 = "/" > > http://trac.lighttpd.net/trac/wiki/server.error-handler-404Details don't forget to add a header('HTTP/1.1 200 OK',true,200); in your script

