Donot want show Magento home using htaccess file

筅森魡賤 提交于 2019-12-11 11:46:25

问题


I want to redirect home page to another page using access, which is not an magento page.But i want show all other pages of magento. event:

example.com  redirect to example.com/index.html (which is not an magento page)
example.com/index.php  redirect to example.com/index.html (which is not an magento page)

but i want to show other magento pages ...


回答1:


Why not just use the directoryindex directive?

In htaccess you can put this at the top to specify your root index file.

DirectoryIndex index.html

And you can create a rule to redirect index.php to the main site like this.

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php$
RewriteRule ^(.*) /index.html [R=301,L]

Then that will be your default index page.



来源:https://stackoverflow.com/questions/21433203/donot-want-show-magento-home-using-htaccess-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!