hide url directory

前端 未结 2 742
借酒劲吻你
借酒劲吻你 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:26

    you can find some good hints when you will look for mod_rewrite or mod rewrite in htaccess.

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题