htaccess pretty URL with PHP & URL variables

后端 未结 1 397
梦谈多话
梦谈多话 2021-01-28 23:17

hoping someone can offer some assistance here. This is an issue with multiple layers. In short, I want to have pretty URLs that use a URL variable to a file within a folder.

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-28 23:32

    After some playing, I figured it out. My regex was off.

    Changed:

    # Make URLs sexy!
    RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L]
    

    to:

    RewriteRule ^(.*)(/)/?$ index.php?page=$1 [L]
    

    0 讨论(0)
提交回复
热议问题