Forums

need some magic matching subdomains and permalinks.... (8 posts)

  1. psc00
    Member
    Posted 4 years ago #

    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 http://blog.domain.com/2008/02/08/sample-post/
    however by default permalinks have format
    http://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 http://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

  2. moshu
    Member
    Posted 4 years ago #

    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!)

  3. psc00
    Member
    Posted 4 years ago #

    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: http://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 http://domain.com/blog to http://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

  4. psc00
    Member
    Posted 3 years ago #

    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 http://blog.domain.com. That works fine using the default Permalinks setting (format http://blog.domain.com/?p=123)

    When I change the Permalinks option to http://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!

  5. psc00
    Member
    Posted 3 years ago #

    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

  6. moshu
    Member
    Posted 3 years ago #

    After a fresh install on blog.domain.com, I installed the plugin to disable canonical redirects, and changed the Blog address (URL) to http://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?

  7. psc00
    Member
    Posted 3 years ago #

    Because if I don't change Blog address (URL) to http://blog.domain.com, all my posts end up with the format http://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 http://domain.com/blog

  8. moshu
    Member
    Posted 3 years ago #

    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!

    http://moshu.transycan.net/

Topic Closed

This topic has been closed to new replies.

About this Topic