Moja lekcja

 0    11 fiszek    guest2883418
drukuj graj sprawdź się
 
Pytanie - Odpowiedź -
Włączenie rewrite
rozpocznij naukę
RewriteEngine On
Forcing www in the URL (RewriteRule)
rozpocznij naukę
RewriteRule (.*) https://www.example.com/$1 [R=301, L]
Forcing www in the URL (RewriteCond)
rozpocznij naukę
RewriteCond %{HTTP_HOST} ^example.com
Input: user/NAME/ Output: user. php? id=NAME
rozpocznij naukę
RewriteRule ^user/(\w+)/?$ user. php? id=$1
Optional trailing slash "/" in pattern
rozpocznij naukę
/?
End of Input in pattern
rozpocznij naukę
$
RewriteCond do jakiego RewriteRule
rozpocznij naukę
Wszystkie RewriteCond powyżej jednego RewriteRule muszą zostać spełnione
Syntax of a RewriteRule
rozpocznij naukę
RewriteRule Pattern Substitution [Flags]
Syntax of a RewriteCond
rozpocznij naukę
RewriteCond TestString Condition [Flags]]
Pattern do wybrania wszystkich adresów
rozpocznij naukę
^(.*)$
The [L] flag
rozpocznij naukę
indicates that this is the last rule to parse. Beyond this line, the rewrite engine should stop.

Musisz się zalogować, by móc napisać komentarz.