Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用.php的消失来隐藏文件名。我试图编写.htaccess文件来限制我的URL。但它没有隐藏。任何人都可以逐步帮助我如何隐藏 URL。下面我提到了实际的 URL。和预期的 URL。
实际网址:varthakindia.com/inners.php?cid1=Hotels
预期网址:varthakindia.com/Hotels/
在 .htaccess
RewriteEngine On RewriteRule ^Hotels$ inners.php?cid1=Hotels [L,NS]
使用 mod_rewrite
RewriteEngine on RewriteRule ^Hotels/?$ inners.php?cid1=Hotels [L, NS]