我的网页上有此链接格式:
https://mypage.com/index2.php?page=registration
https://mypage.com/index2.php?page=food&category=1
第一种类型被替换为:
https://mypage.com/registration (works well)
我想将第二个格式化为:
https://mypage.com/food/1 (doesn't work, the page is loaded, but the images don't)
所以我创建了以下 htaccess 文件:
RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteRule ^([^/.]+)?$ index2.php?page=$1 [L]
RewriteRule ^food/([^/.]+)?$ index2.php?page=food&category=$1 [L]
但不起作用。:(这有什么问题?图片在哪里?谢谢你的回答。