• Resolved gamma911

    (@gamma911)


    When using 1and1 you can set the control panel to redirect a subdomain to a folder in the webserver.

    Versions of wordpress before 2.3 is fine with the redirect – no problem at all the server will redirect to the folder and you can change the URL of the installation and you can now access the folder through that domain.

    Since version 2.3 when you set up the redirect it redirects to the correct folder but then wordpress redirects you to the root folder.

    Can anyone tell me if anything has changed since the last version todo with urls and redirects?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter gamma911

    (@gamma911)

    Previous versions of wordpress didn’t need the site url updated until the redirect was in place.

    New version have to have the site url in options updated to the right url else the redirect doesnt work

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    New versions of WordPress have built-in canonical redirection. WordPress will redirect you to the correct URL when you use a wrong one. This is to help with search engines, mainly, as the redirections will cause search engines to always have the correct URLs, regardless of the links to those URLs.

    I am also using 1and1 for hosting. I have a subdomain “blog.bluelime.com” that I would like to have work as a direct link to my blog, but at the same time have “www.bluelime.com/blog” work. This /blog subdirectory is where the wordpress info has been installed. I tried changing the options and “wordpress address” and “blog address” but neither worked the way I thought they should. Am I doing something incorrectly?

    I have a very similar problem and have found this relatively inactive thread. For what I have seen here and in other places (or, to be more precise, for what I have not seen) I am starting to believe that nobody can give an answer to the redirect problems in 1&1… because there is none. I’ll try it and not lose hope, just in case: if anybody can help it will be very, very welcome.

    In short:

    1. I have a fresh WordPress 2.5 installation in my 1&1 space. I installed it in a “/blog” folder, and WP is configured with “https://www.mydomain.com/blog” [just an example] both as WP URL and as Blog URL.
    2. It works: My blog can be found at “www.mydomain.com/blog”, I can login… no special problems.
    3. But…. (there’s always a but!)

    4. I would prefer to access my blog at “blog.mydomain.com”. I can do that if I configure a redirect in 1&1 (a frame or http redirect, both work), but I’ve read that those redirects are not liked by search engines, can bring problems, are not too “clean”, etc.
    5. Also, imho, it would make much more sense to make that happen configuring “/blog” as the home directory (or whatever it’s called) of “blog.mydomain.com” instead of using an “external” redirect… but that does not work: If I configure my subdomain as “pointing” to the /blog folder… it doesn’t, blog.mydomain.com takes you to www.mydomainxyz.com.

    Any ideas, anybody? How do I configure 1&1’s control panel? – and do I have to make any changes in WordPress?

    Sorry if I’ve been a bit messy: I am not very familiar with these things, and English is non my first language.

    Thank you in any case, and greetings from sunny Spain,
    -Enrique

    You need to choose which URL you want the blog to be at – blog.domain.com or domain.com/blog

    One possibility is to set up in the 1&1 Control Panel the subdomain blog.domain.com – but do not point this to the same place in the folder structure as domsin.com/blog

    Then, upload and sort out WordPress at that location.

    Finally at domain.com/blog do a PHP redirect so it automatically goes to blog.domain.com – i.e. make an index.php page for domain.com/blog which only has this code:

    <?php
    header("Location: https://blog.domain.com/");
    exit;
    ?>

    That will automatically redirect the browser domain.com/blog to blog.domain.com with no delay (unlike a http redirect which could cause a delay).

    Mojorob, thanks very much for your help, this is driving me nuts.

    I definitely want my blog to be at “blog.domain.com“.

    If I understand correctly, to do that I have to:
    – Point “blog.domain.com” to “domain.com/newfolder” in 1&1 Control Panel.
    – Install WordPress in “domain.com/newfolder” – not in “domain.com/blog”, where it is now. (I’ve found a lot of information on how to move WP from one folder to another, wish me luck).
    – Additionally, place that particular index.php in “domain.com/blog” folder – that will now basically be empty (index.php will forward those who “land” there to “blog.domain.com”).

    I’m going to try that right now.

    Some additional questions (and thanks again). Apart from doing that…
    -How do I now have to configure WordPress options (URLs)? Do I just set both as “blog.domain.com”?
    -Will “blog domain com” be a transparent and permanent address, that I can use for search engines, etc – or will this setting have some sort of bizarre twist that might not be liked by them?

    Many questions, I know. And all I can give in exchange is… many thanks!

    Greetings from sunny Madrid.
    -Enrique

    Mojorob,

    Done – and working perfectly. In case someone with a similar problem finds this in the future I’ll give some details:
    1- I followed your instructions, as outlined above,
    2- Then I moved my WP installation from /blog to /newfolder (I used Filezilla, and strictly followed the instructions given, for example, here). Oh, I entered “blog.domain.com” for both URLs in Admin > Options > General.

    Now everything is working as I wanted with no problems whatsoever.

    Thank you!
    -Enrique

    No problem! I use 1&1 in the UK, and have several domains hosted in the one account with them!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘1and1 subdomain redirect wordpress issue’ is closed to new replies.