我的网址:private boolean isPackageInstalled(String packagename, Context context) {
PackageManager pm = context.getPackageManager();
try {
pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES);
return true;
} catch (NameNotFoundException e) {
return false;
}
}
它应该是:
www.example.com/index.php?fruit=banana&color=yellow&amount=2
----->成功
那么为什么呢:
www.example.com/banana/yellow/2
-----> ERROR
htaccess的:
www.example.com/banana/2
答案 0 :(得分:0)
试试这个:
RewriteEngine On
RewriteRule ^/?([^/]+)/([^/]+)/([^/]+)/?$ ./index.php?fruit=$1&color=$2&amount=$3 [QSA,NC,L]
RewriteRule ^/?([^/]+)/([^/]+)/?$ ./index.php?fruit=$1&amount=$2 [QSA,NC,L]