문제

i have a rule like this and works:

http://domain.com/rewrite points to index.php?page=rewrite

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(\w+)$ ./index.php?page=$1 [QSA,L]

now I need to add one more rule:

index.php?run=rewrite&task=more-stuff

and points to

http://domain.com/rewrite/more-stuff

any ideas how to do this?

도움이 되었습니까?

해결책

Maybe

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(\w+)$ ./index.php?page=$1 [QSA,L]
RewriteRule ^(\w+)/([\w-]+)$ ./index.php?run=$1&task=$2 [QSA,L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top