Please help:
On the domain sand.online/ I want to host different web applications I am testing. The domain/ server will have applications in their own folder e.g for wordpress it is /var/www/wordpress for laravel application /var/www/laravel.
Now I have a customised vanilla php that was working perfect with .htaccess and Apache. The htaccess redirect configurations is:
Just a guess. You might need to play around with the regexes to get it to work exactly the same way, just took a guess here. I combined each of the pairs because I think the (/?) and .htm(l?) parts can be combined to avoid essentially duplicate regexes.
You can rename the rules to whatever makes sense to you, as it’s unclear what the purpose of them are to me from looking at just that config.
Thank you for your prompt reply and thank you it worked.
Follow up
The Caddyfile I have stated:
sand.online
root * /var/www
This domain will have all sought of demo web application. Thus in this case this application (lets call it “myOldPhpApp”) is in the folder /var/www/myOldPhpApp. When I change the Caddyfile to below it works:
sand.online
root * /var/www/myOldPhpApp
It works but the rewrites affects the other applications like the laravel app in this folder e.g /var/www/laravel which I could access it https://sand.online/laravel and wordpress in this folder /var/www/wordpress url https://sand.online/wordpress. The laravel and wordpress is not working after I implement the rewrite code. But when I return to the previous configuration and remove the rewrites the wordpress and laravel works but oldPhp does not.
Thus my question is, how do I implement the rewrite to only implement to /var/www/myOldPhpApp folder? That is https://sand.online/oldPhpApp will have the rewrites but https://sand.online/laravel will not have the rewrites.
Before with Apache I just used the .htaccess in the folder to control.