Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Niedzialające .htaccess na lighttpd
Forum PHP.pl > Forum > Serwery WWW
XQS
Mam zainstalowane lighttpd i nie działają mi pliki htaccess.
Serwer jest nowy i nic w nim nie zmienialem w konfiguracji. Jak uruchomić htaccess na serwerze ?
mat-bi
(Dobtra, miałem się wstrzymac, więc to dla Daiquiri smile.gif)

Htaccess jest tylko dla Apache
XQS
Już czaje, do configu lighttpd musze wklejić. Ale nie mam pojecia jak przerobić taki .htaccess pod lighttpd.

Kod
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^bany$ index.php?app=custompages&do=show&pageId=1
</IfModule>
mlawnik
http://tinyurl.com/3lyn8nb
XQS
Jak bym znalazł jakoś informacje i doszedl do tego jak przenieść ta regółke na lighttpd to bym nie pisał z prośba o pomoc.
Google to zawsze pierwsze źródło informacji dla mnie, wiec mnie nie odsyłaj do niego bo nic tam nie ma na ten temat.
mlawnik
url.rewrite

http://redmine.lighttpd.net/wiki/1/Docs:ModRewrite

RTFM

No, nie będę wredny
XQS
To też widziałem, tylko nie potrafie rozszyfrować jak przemienić moją regułkę. Nie znam sie na PHP.
mlawnik
To nie php, tylko składnia regularna (regex)
Cytat
Regular Expressions
Patterns ("wildcards") are matched against a string
Special characters (see [http://www.regular-expressions.info/reference.html] for reference):
. (full stop) - match any character
\* (asterisk) - match zero or more of the previous symbol
\+ (plus) - match one or more of the previous symbol
? (question) - match zero or one of the previous symbol
\\? (backslash-something) - match special characters
^ (caret) - match the start of a string
$ (dollar) - match the end of a string
[set] - match any one of the symbols inside the square braces.
[^set] - match any symbol that is NOT inside the square braces.
(pattern) - grouping, remember what the pattern matched as a special variable
{n,m} - from n to m times matching the previous character (m could be omitted to mean >=n times)
(?!expression) - match anything BUT expression at the current position. Example: "^(/(?!(favicon.ico$|js/|images/)).*)" => "/fgci/$1"
Normal alphanumeric characters are treated as normal


//^^ dla lighttpd

Cytat
Char. Definition
\ Use before any of the following characters to escape or null the meaning or it. \* \. \$ \+ \[ \]
^ Start matching at this point
$ End point of the match
. Any character
[] Starts a class
| Starts alternative match this|that would mean match this or that
() starts a back reference point
? match 0 or 1 time Quantifier
+ match atleast 1 or more times Quantifier
* match 0 to infinite times Quantifier
{} match minimum to maximum Quantifier {0,3} match up to 3 times
Class Definitions []

Char. Definition
^ Negates the class. [^A-Z]+ means don't match any uppercases
\ Use before any of the following characters to escape or null the meaning or it. [\+]+
- Range for matching [0-9]+ [a-zA-Z]+


//^^ dla apache

No i teraz sobie pozamieniaj na odpowiadające znaki

na przykład:
url.rewrite-once = ( "^bany$" => " index.php?app=custompages&do=show&pageId=1>" )

To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.