0

I though this was a simple issue. When i type in the browser:

www.example.com

it changes to:

www.example.com/home/

This delivers the proper contents from the Home page, but i wish to stay showing the www.example.com address.

I've configured %postnames% as Permalink, and setting the Static Front Page as the page Home through the Customizer. Also, i've deleted the .htaccess both on the public_html and the wp folder. The page has the title Home with the slug word home. AFAIK no other redirects remain on server side.

On Settings/General Settings/WordPress Address (URL): http://www.example.com/wp

On Settings/General Settings/Site Address (URL): http://www.example.com

I dont see any redirects on server side...

What should i do to make this "blind" redirection without affecting the address?. I need to remove the duplicate www.example.com/myhome and www.example.com for JSON Canonical URL purposes.

  • Have you installed WordPress in a sub folder named myhome? – Brad Dalton Apr 2 '15 at 13:12
  • This is installed under public_html/wp folder :/ – Brethlosze Apr 2 '15 at 17:30
  • Why can't you migrate it to your public_html root directory? – Brad Dalton Apr 3 '15 at 4:03
  • I already did it. I will auto answer my question :/... – Brethlosze Apr 3 '15 at 7:13
1

If there is no clear evidence of any present redirect from the following sources:

  1. The htaccess, both under the public_html and under the public_html/folder (where folder is the directory having all the wp files), removing and regenerating them by mean of updating the permalinks,
  2. The .htaccess files were at some point deleted, and regenerated,
  3. The domain server, removing all possible redirects,
  4. The index.php files, which redirects calls where there are no files to serve,
  5. The Static Page is correctly configurated,

The options you have are:

  1. To Create a dumb home page index.php,home.php or any similar flavoured choice, on the public_html folder,
  2. To seek for a plugin able to do that (Of course i skipped these step, in order not to increase even more the huge amount of manhours for solving this issue),
  3. To migrate/reinstall everything on the public-html folder.

The last choice, is by far the simpler and straighter.

By default, a fresh installation of WP leaves everything well configured on the www.example.com folder. IF you install on a wp or a folder, you lost the pretty address, and risk a little uglier canonical url (www.example.com/home).

Check here, https://codex.wordpress.org/Moving_WordPress-, in particular, the section "If You Have Accidentally Changed your WordPress Site URL" which shows two 'hack' lines to reenter the modified folder.

Thus, when WP install to the same 'public_html', the Canonical URL can then preserved to www.example.com, and no duplicity is found.

For clarity the steps are:

  • Rename folder to newfolder, where folder is the directory for the WP installation,
  • Edit the index.php and .htaccess and change 'folder' with 'newfolder', if required,
  • Add the two lines on wp-login.php (see the above guide!):

    update_option('siteurl', 'http://www.example.com/newfolder' ); update_option('home', 'http://www.example.com/newfolder' );

  • Open http://www.example.com/newfolder/wp-admin. The update should be ready now.

And that's all. The migrated WP installation now starts directly at www.example.com after the proper configuration of the Static Page.

  • And remove the update_option code after reloading your site. – Brad Dalton Apr 3 '15 at 10:29
0

There is a option to mention your site address in General Settings. I think that is what you need to change.

  • Hello, On Settings/General Settings/WordPress Address (URL): http://www.example.com/wp On Settings/General Settings/Site Address (URL): http://www.example.com I dont see any other options. Nor on server side... – Brethlosze Apr 2 '15 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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