.htaccess,一起获取参数?

时间:2013-12-08 15:20:48

标签: php .htaccess getparameter

/index.php?user=username/username

/index.php?page=settings/settings

请帮帮我,建议.htaccess或PHP的解决方案,非常感谢!

1 个答案:

答案 0 :(得分:0)

将.htaccess代码更改为

RewriteBase /

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /(.*)$ index.php?user=$1
RewriteRule /(.*)$ index.php?page=$1