Replace URL query string with slash for a friendly URL

前端 未结 1 836
醉话见心
醉话见心 2020-12-21 14:37

I use the following query string

?eve=MTkzODMwMjk0OQ==

to change the content of the node\'s body according to the value of the value of eve.

The full

相关标签:
1条回答
  • 2020-12-21 14:57

    You can even omit .php to make it more clean

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule event/eve/(.*)/ event.php?eve=$1
    RewriteRule event/eve/(.*) event.php?eve=$
    

    Example URL

      http://localhost/party/event/eve/MTkzODMwMjk0OQ/ 
    

    will transfer to

      http://localhost/party/event.php?eve=MTkzODMwMjk0OQ==
    
    0 讨论(0)
提交回复
热议问题