URL rewrite to remove parameters

后端 未结 2 1661
长发绾君心
长发绾君心 2021-01-28 16:18


I\'m working on a site where all the pages are actually index.php + a \'name\' parameter that is analyzed and loads the appropriate template and content.
the homepage u

2条回答
  •  [愿得一人]
    2021-01-28 16:56

    The following should be what you're looking for (for your second, less crucial, question). Put it in your .htaccess-file:

    RewriteEngine On
    RewriteRule ^/([a-zA-z0-9-_]+)/?$ index.php?page=$1
    

提交回复
热议问题