I want to rewrite only / and nothing else. Meaning
/ => /fp/
However I still want all other files to be able to accessed directly.
/login.php => still loads
/join.php => still loads
/index.php => still loads
etc.
I have tried several different ways of doing this, but it seems when it works it forwards ALL files in / instead of ONLY / when called by itself
I have tried things like:
rewrite ^ /fp/ break;
rewrite ^/ /fp/ break;
I have tried so many ways I can't think straight.
How do I do this?
Currently my config looks like:
location / {
proxy_pass http://192.227.210.138:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {
root /home/account_name/web/domain.tld/public_html;
access_log /var/log/apache2/domains/domain.tld.log combined;
access_log /var/log/apache2/domains/domain.tld.bytes bytes;
expires max;
try_files $uri @fallback;
}
rewrite ^ /fp/ break;
}