Moja lekcja

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

You must sign in to write a comment