0

Hello I need to pick your brains here. So one of my projects went live a long time ago. The customer then asked me to build a second project which was supposed to be go live on a different domain. Not they aske dme to upload the project into a subfolder of their root. Everything is fine, I can access the admin and stuff, but the moment I open a blog post for example or navigate to one of the pages on their subfolder it automatically redirects me to the main domain.

I have checked the .htaccess which looks fine to me

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /nameofnewsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /nameofnewsite/index.php [L]
</IfModule>
# END WordPress

1 Answer 1

1

OK after doing some more research I found out that I had to change the configs for the NGINX files as well.

I simply had to add the following parameters before the last closing bracket

location /nameofnewsite {
        try_files $uri $uri/ /nameofnewsite/index.php?$args;
}

location ~ \.php$ {
        fastcgi_split_path_info ^(/nameofnewsite)(/.*)$;
}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.