작은숲:위키노트/아파치 mod rewrite 모듈: 두 판 사이의 차이
잔글
문자열 찾아 바꾸기 - "</source>" 문자열을 "</syntaxhighlight>" 문자열로
잔글 (문자열 찾아 바꾸기 - "<source" 문자열을 "<syntaxhighlight" 문자열로) |
잔글 (문자열 찾아 바꾸기 - "</source>" 문자열을 "</syntaxhighlight>" 문자열로) |
||
| 4번째 줄: | 4번째 줄: | ||
<syntaxhighlight lang="apache"> | <syntaxhighlight lang="apache"> | ||
RewriteRule ^redirect$ ./redirect.php?target=%{QUERY_STRING} [L] | RewriteRule ^redirect$ ./redirect.php?target=%{QUERY_STRING} [L] | ||
</ | </syntaxhighlight> | ||
이렇게 하면 쿼리 문자열로 넘어온 값을 <code>$_GET['target']</code>에 값을 넣어 제대로 넘어온다. | 이렇게 하면 쿼리 문자열로 넘어온 값을 <code>$_GET['target']</code>에 값을 넣어 제대로 넘어온다. | ||
== RewriteRule의 QSA 플래그 == | == RewriteRule의 QSA 플래그 == | ||
| 25번째 줄: | 25번째 줄: | ||
# from http://example.com/page.php?foo=bar | # from http://example.com/page.php?foo=bar | ||
# to http://example.com/target.php?foo=bar&bar=baz | # to http://example.com/target.php?foo=bar&bar=baz | ||
</ | </syntaxhighlight> | ||
== 참고 == | == 참고 == | ||
* [https://wiki.apache.org/httpd/RewriteQueryString Manipulating the Query String] | * [https://wiki.apache.org/httpd/RewriteQueryString Manipulating the Query String] | ||