Is there a way to redirect a non-www subdirectory to that subdirectory with the www domain?

39 Views Asked by At

I'm new to web hosting and I'm currently having trouble redirecting subdirectories that don't have the www subdomain.

Typing

example.com/subdirectory/ 

just goes to

https://www.example.com/

I want it to go to from

example.com/subdirectory/ 

to

https://www.example.com/subdirectory/

I'm using django, pythonanywhere, and namecheap.

I've already looked a lot online but there just doesn't seem to be any examples with someone using django, pythonanywhere and namecheap. There were some cases where using htaccess solved the problem, but I don't think it's compatible with django?

0

There are 0 best solutions below