سؤال

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