Support » Fixing WordPress » .htaccess and redirecting WP to subfolder

  • Hi,

    I have old WP site installed in /public_html/ and new, updated site installed in /public_html/uusinetti/

    I would like to have domain traffic redirected to the new site located in the subfolder so that the site URL won’t change. I found this article (link below) and followed Method 1 described in the article.

    The outcome is almost ok. It redirects the traffic to the new site but when it does, it also shows subfolder name in the URL. And my target is to have URL without subfolder name in it. What should I fix to make it behave as I want?

    [ redundant link removed ]

    Support article describing .htaccess modification is this one: https://wordpress.org/support/article/giving-wordpress-its-own-directory/

    • This topic was modified 10 months, 2 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have to configure the rewrite of the url, WordPress url indicates where they physically redo expose the wordpress files while Siteurl is the url shown to the browser. you have two choices: Insert an htaccess rule in the root and rewrite the url for the site in the subfolder or change your Siteurl (for WordPress subdirectory) without final slash from the wordpress panel and edit the index.php (WordPress root) file to point to the file with subfolder (ie at the second wordpress installation) with this second method only the path that does not correspond to a directory or a regular file makes a redirect via htaccess to index.php.

    Giving WordPress Its Own Directory

    I might add, that if you have your DNS pointing to that new subfolder, you shouldn’t have to do any special redirects with an .htaccess file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess and redirecting WP to subfolder’ is closed to new replies.