WordPress.org

Support

Support » Multisite » [Resolved] directions www and links problems

[Resolved] directions www and links problems

  • Hi there! : )

    I´m getting some technical issues with links and www redirections.

    well, if I type the URL without www al seems to work fine, but if I take any url, for example:

    thepadclub.es/el_muro

    but, if I type http://www.thepadclub.es/el_muro it takes me to the home page. I´ve realizaed that it doesn´t happen with all pages, it happens with buddypress pages and statics pages too.

    Any idea?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Good Morning!

    I´ve tried both solutions but the issue persists.

    Here goes my htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^thepadclub.es$ [NC]
    RewriteRule ^(.*)$ http://www.thepadclub.es/$1 [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Any idea???

    Thanks : )

    First: always separate your .htaccess rules and comment them (you will forget later, save yourself agony 😉 ) – and also always put WordPress’s rules at the bottom.

    # Force WWW
    RewriteCond %{HTTP_HOST} ^thepadclub.es$ [NC]
    RewriteRule ^(.*)$ http://www.thepadclub.es/$1 [R=301,L]
    
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    That said, when I go to http://www.thepadclub.es/ it redirects me to http://thepadclub.es/ which tells me you set your site up sans www, and that’s totally okay. I don’t get redirected to the home page at all.

    Yes now it works perfectly! I don´t know why but when I edited my htaccess file in my computer and upload it by FTP, changes weren´t be saved! Just editing the file directly in the server it started to work!

    Thank you very much for your great support.

    liongabriel

    @liongabriel

    I tried this fix, but it’s not working for me – can you take a look at my issue?

    http://www.lawoffice.org.il takes me to the old site… not even connected to my server,

    while ‘lawoffice.org.il’ takes me to the proper place.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] directions www and links problems’ is closed to new replies.
Skip to toolbar