Welcome! Log In Create A New Profile

Advanced

Re: Need to remove folder name from URL

February 11, 2015 11:35AM
Will do...in case this helps...here's my config

server {
listen 80;
client_max_body_size 4G;
server_name example1.com;
passenger_enabled on;
root /home/<user>/current/public;
rails_env production;
keepalive_timeout 5;


location = / {
proxy_pass http://example1.com/<folder>; // This is to silently redirect the root of http://example1.com to http://example1.com/<folder>
}

location ~ ^/assets/ {
root /home/<user>/current/public;
expires max;
add_header Cache-Control public;
add_header ETag "";
break;
}


location /system {
proxy_pass http://www.example.com; // This is to silently redirect http://example1.com/system to example.com/system, but to still show example1.com/system in the address bar
}



location ^~/wcmc {
proxy_pass http://example.com/<folder>; // This silently redirects example1.com/ to example.com/<folder>
}
}


This all works in that

going to example1.com gives me the page at example.com/<folder>

Clicking the links on the page take me to the correct page on example.com, but show example1.com in the addressbar.

eg

example1.com/<folder>/history


I need to hide the <folder> part of it.
Subject Author Posted

Need to remove folder name from URL

strtwtsn February 11, 2015 09:22AM

Re: Need to remove folder name from URL

itpp2012 February 11, 2015 09:37AM

Re: Need to remove folder name from URL

strtwtsn February 11, 2015 10:03AM

Re: Need to remove folder name from URL

itpp2012 February 11, 2015 10:06AM

Re: Need to remove folder name from URL

strtwtsn February 11, 2015 11:35AM

Re: Need to remove folder name from URL

Francis Daly February 11, 2015 03:10PM

Re: Need to remove folder name from URL

strtwtsn February 12, 2015 03:06AM

Re: Need to remove folder name from URL

Francis Daly February 12, 2015 05:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready