How to write RewriteBase in .htaccess?


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 . On the server, the path to the folder is /path/demo/ . Accordingly, http::// 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?


My opinion is no way.

Scroll to Top