2

I'm working in python/django with apache and a Nginx proxy.

I need to transform some URLs like these:

www.mydomain.com/client_A/

www.mydomain.com/client_B/

to

www.mydomain.com/clients/1/

www.mydomain.com/clients/2/

I would do a rewrite in the Nginx configuration, but the problem is that this should Not be visible to the user, rather he should keep seeing the URL as www.mydomain.com/client_A/ and Not as the internal URL.

The main idea is to do this in the Nginx/Apache configuration

Thanks in advance.

2 Answers 2

2

I believe

 rewrite ^/client_A/(.*)$ /clients/1/$1 last;

in nginx config should work.

Sign up to request clarification or add additional context in comments.

Comments

0

You might want to look into the following post for related question.

apache reverse proxy changes url

The idea is to use a reverse proxy with Apache to keep URLs same.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.