www.example.com/tour_detail/angkor-songsaa-luxury-private-island-honeymoon-premium-tour-19-105.html
注意:19-105是id,所以我不希望它像我想要的那样显示
www.exmaple.com/tour_detail/angkor-songsaa-luxury-private-island-honeymoon-premium-tour
答案 0 :(得分:0)
把它放在.htaccess中:
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^angkor-songsaa-luxury-private-island-honeymoon-premium-tour/?$ angkor-songsaa-luxury-private-island-honeymoon-premium-tour-19-105.html [NC,L] # Handle requests for your url
如果您想阅读更多内容:https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/