Is it possible to have dynamic RewriteBase on .htacess?

亡梦爱人 提交于 2019-12-25 11:53:46

问题


I made a CodeIgniter based website. I write a .htaccess as suggested in http://codeigniter.com/wiki/mod_rewrite

Since I put my web directory in public_html/ci_try, It is necessary to change

RewriteBase /

into

RewriteBase /ci_try

But, everytime I change the location, I should edit htacess. Is there a way to make such a "dynamic rewrite-base" or other way so that I don't need to repeat my self editing htaccess?

UPDATE : For now I use php to generate htaccess. But I want to know if there is a better solution out there to be accepted

来源:https://stackoverflow.com/questions/10927083/is-it-possible-to-have-dynamic-rewritebase-on-htacess

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