Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 如何隐藏文件夹名和userprofile.php?user=by htaccess_.htaccess - Fatal编程技术网

.htaccess 如何隐藏文件夹名和userprofile.php?user=by htaccess

.htaccess 如何隐藏文件夹名和userprofile.php?user=by htaccess,.htaccess,.htaccess,在我的web根目录中,我的页面是: index.php, 关于.php, header.php, footer.php, contact.php, .htaccess 和在登录文件夹中 register.php, main.php, userprofile.php, .htaccess 根页面显示url:www.myweb.com/about 并显示登录文件夹页面 网址: www.myweb.com/login/main www.myweb.com/login/userprofile.php?u

在我的web根目录中,我的页面是:

index.php, 关于.php, header.php, footer.php, contact.php, .htaccess

和在登录文件夹中

register.php, main.php, userprofile.php, .htaccess

根页面显示url:www.myweb.com/about

并显示登录文件夹页面 网址: www.myweb.com/login/main www.myweb.com/login/userprofile.php?user=myname

现在,我如何通过.htaccess从地址栏隐藏login和userprofile.php?user=。
我想显示登录文件夹页面url,如:www.myweb.com/main、www.myweb.com/myname

您想在浏览器中显示的url是什么?更新我想显示的内容。谢谢您,先生。如果根目录中也存在main.php,那么@koc:main.php可能会重复吗?在这种情况下,www.myweb.com/myname可能会变得模棱两可@anubhava:如果我使用您之前发布的规则,我就无法打开我的主页index.php文件,这意味着www.myweb.com,否则这对所有其他页面都很有效。显示:您没有访问/登录/此服务器的权限。404未找到错误。。