我想在我的博客使用.htaccess
网址只有最后一部分。
https://example.com/blog/category1/category2/postname1
https://example.com/blog/category1/postname2
我想有只:
https://example.com/blog/postname1
https://example.com/blog/postname2
用户RewriteRule
规则
该规则将像..
RewriteRule ^([a-zA-Z0-9-]+)$ blog/postname1?slug=$1 [L]
检查这个网址: - How to rewrite url with post title slug?