WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] directions www and links problems (6 posts)

  1. Alberto Rivera
    Member
    Posted 1 year ago #

    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.

  2. Alberto Rivera
    Member
    Posted 1 year ago #

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

  3. 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.

  4. Alberto Rivera
    Member
    Posted 1 year ago #

    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.

  5. liongabriel
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic