The MU forums have moved to WordPress.org

x.com/blog_name/wp-admin redirects to x.com/wp-admin/ (8 posts)

  1. deanbag
    Member
    Posted 17 years ago #

    if I leave off the trailing slash in the url: http://www.mysite.com/myblog/wp-admin, I get redirected to http://www.mysite.com/wp-admin/ instead of http://www.mysite.com/myblog/wp-admin/

  2. drmike
    Member
    Posted 17 years ago #

    Details about your setup would help.

    Do you really have 'www' in there?

    The files are in the root for mysite.com, right?

    Is this a parked/ addon domain or does it have it's hosting account? (I'm leaning towards that which isn't going to work. There's a couple of threads already about this)

    Is the .htaccess populated with something like what's in the htaccess-dist.php file?

  3. deanbag
    Member
    Posted 17 years ago #

    sorry, I was trying to keep it generic, it's actually blogs.mysite.com, here's my apache conf:
    NameVirtualHost *:80

    <VirtualHost *:80>
    DocumentRoot "/storage/wwwroot"
    <Directory "/storage/wwwroot">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot "/storage/wwwroot/wpmu"
    ServerName "blogs.mysite.com"
    <Directory "/storage/wwwroot/wpmu">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    Everything else seems to be working ok, just this redirect to the main blog's wp-admin if I leave off the trailing slash when trying to access wp-admin of a regular blog.

  4. drmike
    Member
    Posted 17 years ago #

    Everything else seems to be working ok

    Then I guess it would be working, right?

    Please take a second and answer the questions posed to you.

    Thanks,
    -drmike

  5. dsader
    Member
    Posted 17 years ago #

    Same for me with an "out of the box" install on my regular installs and sandbox. In fact it doesn't matter what url you omit the trailingslash from(backend only), it always redirects to the domain root.

    Must need more code for a non-vhosts.

    Non-vhosts add the trailing slash but redirect to the root domain.

    Must have always been this way, never heard anyone complain.

  6. deanbag
    Member
    Posted 17 years ago #

    drmike: this is a virtual machine I'm running wordpress mu in. all the files are in /storage/wwwroot/wpmu, which I thought I answered with the posting of my apache conf. I add an entry in my hosts file to match the IP of the virtual machine to "blogs.mysite.com"

    >>Everything else seems to be working ok

    >Then I guess it would be working, right?

    the purpose of this post was to show that I think there is a bug in the redirection in the case of a missing trailing slash. *That* is not working.

    dsader: thanks for the validation.

  7. deanbag
    Member
    Posted 16 years ago #

    FYI, I think I resolved this with the following Rewrite rules I scavenged from an old semi-related ticket:
    This fixed the links issue I've seen other people had (i.e. blogs.mysite.com/blog_name had Next/Prev links like blogs.mysite.com/blog_name/blog_name/page/2)
    And also solved my problem where blogs.mysite.com/blog_name/wp-admin redirected to blogs.mysite.com/wp-admin/:

    # force a trailing slash for dirs
    RewriteRule !\..{2,4}$ - [C]
    RewriteCond %{REQUEST_URI} !^.*/$
    RewriteRule ^(.+)$ /$1/ [R=301,L]

    I've submitted a ticket: http://trac.mu.wordpress.org/ticket/351

  8. peiqinglong
    Member
    Posted 16 years ago #

    deanbag, I've been having the same problems also. The rewrite rules you posted did not work for me.

About this Topic

  • Started 17 years ago by deanbag
  • Latest reply from peiqinglong