简体   繁体   English

htaccess-将目录地址重定向到其中的确切页面

[英]htaccess - redirect directory address to exact page in it

Sorry if I am using wrong terminology, while writing this question. 对不起,如果我在写这个问题时使用了错误的术语。 I have a page in the directory on my website: 我的网站目录中有一个页面:

lorumipsum.com/dir/index.php

I would like to redirect to that page everyone, who would write address 我想将每个人的重定向到该页面,谁会写地址

lorumipsum.com/dir

in their browsers. 在他们的浏览器中。 How would would I do that? 我该怎么办? I tried writing in htaccess this line: 我试图用htaccess编写这一行:

Redirect 301 /dir lorumipsum.com/dir/index.php

but it does not appear to work. 但它似乎不起作用。

确保您的DirectoryIndex包含index.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM