Hi there I have my site up and running, domain.com and www.domain.com works fine, the redirect works, but if I create a folder domain.com/folder works, but www.domain.com/folder takes me back to the homepage. I’ve checked the htaccess and nothing caught my attention there
Any ideas how to fix that? Sorry for being so basic but all the articles I’ve been reading are mostly chinese for me :(
I have a droplet running Ubuntu 20.04, apache, mysql, php and couple other things in case that helps
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Thank you Alex ! I forgot to mention, looking to simplify the explanation, that “folder” was an example, the folder name is a name the system creates for each registered user, so is dynamic, I have just a few users now, but hope to get more, so I have no idea how to fix that for now and the future. Trying to get a hold of the person that developed the php script I’m using, maybe he can help.
Hello, @puntadigital
Could you please confirm that you would like www.domain.com to redirect to domain.com but also to have www.domain.com/folder without redirecting back to domain.com?
If you want to redirect domain.com/folder/ to www.domain.com/folder/ you can use this .htaccess rule:
Hope that this helps! Regards, Alex