Sub domain redirections

Hi, I’m using the newest Kirby.

I’m having trouble installing it on a new sub-domain. After the subdomain kept redirecting from test.example.com to www.test.example.com/test/

I’ve now fixed this issue so it now redirects properly to test.example.com however it now redirects test.example.com/test/ - which brings up a kirby 404. All other default links; blog, projects, contact etc work fine and as expected, it’s just the home page URL that doesn’t function.

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]

The above sorted out the main redirection issues for me. Any guidance?

My homepage links are https://test.example.com/ however as soon as I click it it redirects to https://test.example.com/test/

Are the DNS settings for the domain properly setup? Any wildcards or anything setup?

I’ve used the latest Kirby on a few subdomains and never run into this. Maybe the baseURL option will help.

How are the subdomains structured on the servers file system? are the folders inside the main domains folder? Perhaps another .htaccess file is interferring, but they should supercede ones set higher up the folder system.

Thank you it was a dodgy htaccess file.