i have 2 line want make it one line and do the same job
RewriteRule ^account/?$ account.php
RewriteRule ^account/(.*)/?$ account.php?mod=$1
how i can do it
i have 2 line want make it one line and do the same job
RewriteRule ^account/?$ account.php
RewriteRule ^account/(.*)/?$ account.php?mod=$1
how i can do it
RewriteRule ^account/(.*)/?$ account.php?mod=$1
is enough if account.php can deal with an empty mod, otherwise you will need both rules.
The real merge of both rules would be:
RewriteRule ^account/?(.*)/?$ account.php?mod=$1
but it will not behave as you expect if you have URLs like account-info/foo/
which will then be mapped to account.php?mod=-info/foo
.
If you have other URLs starting with account, go with Ignacio Vazquez-Abrams' answer.