PDA

View Full Version : Switching Projekt on Subdomains not working



Andre F
January 22, 2023, 03:41 PM
Hallo,

i try to switch the script from subdomain1.domain.com to subdomain2.domain.com and renamed the server path. I also changed the domainname in includes/config.inc.php.
The Backend, Homepage and listings are working fine after my subdomain-switch.

Why: i think its good to have a testsystem to try some things out and switch it to livesystem.


But I just have a little problem in frontend and can not find the issue.

All urls-paths like categories, search-on-map.html or about-us.html showing me a 404 error.

I cleared caches and rebuild the paths. But it is not working.

Is the installed url in any other database or files saved for the url paths?

Thank you for your help

Rudi
January 23, 2023, 06:03 AM
Hello,

You need to

- add a wildcard for subdomains on your server

- add a new rule into .htaccess file

after this line:


RewriteCond %{HTTP_HOST} !^www\. [NC]


add:


RewriteCond %{HTTP_HOST} !^subdomain2\. [NC]

Andre F
January 23, 2023, 03:55 PM
Thank you - It is working great

kiowa
January 23, 2023, 08:47 PM
Could never get this to work.
I will try this.