• I’ve been struggling for days to make this work.

    I can make WP work with subdomains, my problem is that I want permalinks in WP to be accessible with the same domain format https://blog.domain.com/2008/02/08/sample-post/
    however by default permalinks have format
    https://domain.com/blog/2008/02/08/sample-post/

    I think I’m almost there:

    – I have a working subdomain blog.domain.com (publishing files on domain.com/blog folder works fine).

    – I’ve installed WP on a different directory, domain.com/wp, that also works fine (installed in a different directory to route requests to the blog folder with htaccess).

    – I tried changing Options / Blog address (URL) to https://blog.domain.com (changing this makes permalinks have the correct format) and playing with htaccess, however cannot make WP work correctly.

    Can you please shed some light?
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Give up all the nonsense redirect attempts.

    If you want to have a WP in
    blog.example.com – install it there: the “blog” subdomain should NOT redirect to a subdir. Period. And it will work! It is that simple.

    (and don’t double and triple post – I am fast with the delete button!)

    Thread Starter psc00

    (@psc00)

    Thanks for your answer, I have another question, though.

    I successfully installed WP on a subdomain, and it works, my problem is that I want the permalinks to match the subdomain URL, and not to be in the form: https://domain.com/blog/2008/02/08/sample-post/

    The only way I found I could do that is by changing in Options the Blog address (URL) from the default https://domain.com/blog to https://blog.domain.com, however when I change that, WP stops working (a blank page appears).

    Is that supposed to work and I’m doing something wrong?

    Thanks

    Thread Starter psc00

    (@psc00)

    Moshu, I’m almost there. I read that disabling WP canonical redirects may help, so I tried that.

    After a fresh install on blog.domain.com, I installed the plugin to disable canonical redirects, and changed the Blog address (URL) to https://blog.domain.com. That works fine using the default Permalinks setting (format https://blog.domain.com/?p=123)

    When I change the Permalinks option to https://blog.domain.com/2008/02/11/sample-post/ the site stops working (I get Error 404 – Not Found). Just in case I tried with the Numeric permalinks option, and get the same error 404.

    Any ideas? (I see that WP is updating the .htaccess file whenever I change the permalink option)

    Thanks!

    Thread Starter psc00

    (@psc00)

    can someone tell me at least if what I want to do is feasible or at least if I’m in the right direction? Simply installing WP and using it with a subdomain works, however is not what I need. thanks

    After a fresh install on blog.domain.com, I installed the plugin to disable canonical redirects, and changed the Blog address (URL) to https://blog.domain.com.

    This sentence doesn’t really make sense…
    If WP is really installed at blog.domain.com – why do you have to change anything in the Options?

    Thread Starter psc00

    (@psc00)

    Because if I don’t change Blog address (URL) to https://blog.domain.com, all my posts end up with the format https://domain.com/blog/2008/02/08/sample-post/, in other words the blog domain is different from the post domain. I need it to be the same.

    By the way, just in case it’s not clear, when I install WP from blog.domain.com, both the blog directory and blog address default to https://domain.com/blog

    Then your subdomain settings are NOT correct. Period. Don’t, repeat: do not redirect your subdomain ever.

    In the last half hour I installed WP on a brnad new subdomain (without any redirection) and set permalinks to date and name based… and it work, despite all your theories ?? – and didn’t touch anything in the Options!

    https://moshu.transycan.net/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘need some magic matching subdomains and permalinks….’ is closed to new replies.