Bellow is my site directory structure:
project-folder/
index.php
Now I have access project using folder name like www.project-folder.com
and also www.folder-name.com/index.php
Problem
If some one user enter www.folder-name.com/index.php
in URL then redirect on www.project-folder.com
using htaccess
.
How can I do this ?
Below line is I tried in htaccess
Directory Index public/index.php
答案 0 :(得分:0)
在www.folder-name.com
Redirect index.php http://www.project-folder.com/index.php
为避免混淆,请使用此类重定向:
Redirect /path/to/old/file/old.php http://www.redirectedwebsite.com/path/to/new/file/new.php