Is there any way to set RewriteBase to the path current folder (the folder which the .htaccess file is in) relative to the host root?
I have a CMS and if I move it to the directory in my host it does not work unless I set the RewriteBase to the path of directory relative to the root of host. I would like my CMS to work with only copy and paste, without changing any code in htaccess.
Update:
For example:
webroot
- sub_directory
- cms
- .htaccess
in this case I should write in the htaccess: RewriteBase /
and if I move the htaccess inside sub_directory I should change RewriteBase to:
RewriteBase /sub_directory/
So I want something like
RewriteBase /%{current_folder}/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…