How to write RewriteBase in .htaccess?

Question:

Here is an example of an existing code:

 RewriteBase /demo/

So: as you can see, the /demo/ folder is relative to the request url . That is, we make a request like this http://site.zone/demo/ . On the server, the path to the folder is /path/demo/ . Accordingly, http:://site.zone/ is located in the /path/ folder.

Task: we give this file to good, inept hands. How can we write RewriteBase so that when changing the name of the demo folder, nothing breaks and everything continues to work without editing the htaccess file?

Answer:

My opinion is no way.

Scroll to Top