.htaccess redirect folder

﹥>﹥吖頭↗ 提交于 2019-12-06 09:20:08

Try this mod_rewrite example:

RewriteEngine on
RewriteRule !^public/ /public%{REQUEST_URI} [L,R=301]

I see that you're using Zend Framework. Zend uses 'public' as the exposed web folder, but you should use the folder dictated by your web host. What is the name of the server-side folder that is exposed to the web? Your file structure should be like this:

application/
[web_exposed_dir]/
library/

In my case, the [web_exposed_dir] is called 'content'. You won't have to redirect everything to 'public' if you do it the way I've outlined.

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