How to Mask Extension in URL

后端 未结 4 1655
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 13:35

Is there a way to mask the URL extensions for pages on my website with PHP? Example: http://home/subfolder instead of http://home.subfolder.php

4条回答
  •  [愿得一人]
    2021-01-15 14:18

    As others have stated, this is done with mod_rewrite if you're on an Apache-enabled server. Various questions have been asked similar to this:

    Related:

    1. How to hide the .html extension with Apache mod_rewrite
    2. Removing .php with mod_rewrite

提交回复
热议问题