hide url directory

前端 未结 2 740
借酒劲吻你
借酒劲吻你 2021-01-16 05:41

I have a website:

www.mydomain.com/subfolder/subfolder/index.php

How could always hide the directory names from the url. I mean always hide

2条回答
  •  伪装坚强ぢ
    2021-01-16 06:27

    If you have access to the Rewrite engine, you can use a simple rewriting pattern similar to this:

    RewriteRule ^/(.*)$ /subfolder/subfolder/$1.php
    

提交回复
热议问题