Most effective way to code SEO friendly URLs?

前端 未结 2 1870
一整个雨季
一整个雨季 2020-12-16 08:07

I currently use .htaccess and PHP to parse URLs in the following way:

URL:

http://blah.com/article/123_this-that-and-the-other
         


        
2条回答
  •  半阙折子戏
    2020-12-16 08:50

    You could get the whole query string as one paramter.

    RewriteRule ^([^.]+)$ index.php?url=$1 [QSA,L]
    

    Then you can split the string with php and convert the different parameters into an array to do whatever you like with.

提交回复
热议问题