• Resolved Kanth

    (@srikanthpulluru)


    Hi,

    I am Getting 404 error when i am typing correct URL but the site is redirecting and url displaying twice.

    i don’t know what happen to my site but i done these changes to my site

    1. Activated SSL Certificate to my site including multisite
    2. Updated PHP 5.3 to 5.4.20

    after observing all url’s some url’s are displaying twice ex: https://site.org/wp-admin when i am typing this it’s Automatically redirecting and displaying https://site.org/wp-adminwp-admin

    Thanks for any suggestions, helps in advance

    Thanks&Regards,
    Srikanth

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    https

    Did you change FROM http?

    Thread Starter Kanth

    (@srikanthpulluru)

    Yes, url has been chaged from https:// to https://

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    How did you do that in WP?

    Thread Starter Kanth

    (@srikanthpulluru)

    I am Running wordpress on hostgator server, before it was http, i requested hostgator support team to activate SSL on my website url.
    After that we added this code

    # BEGIN SSL
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
    # END SSL

    on .htaccess file

    in wp-config file we added

    define(‘FORCE_SSL_ADMIN’, true);
    define(‘FORCE_SSL_LOGIN’, true);
    define(‘RELOCATE’,true);
    define(‘WP_HOME’,’https://site.org/’);
    define(‘WP_SITEURL’,’https://site.org/’);

    Thanks&Regards,
    Srikanth

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay, so … You didn’t edit the DB.

    Go into your database and look at the wp_blogs table – see if it’s https there.

    Thread Starter Kanth

    (@srikanthpulluru)

    I gone through wp_blogs table on my database, and i dint find any Http:// or https:// simply

    domain: site.org

    if i change that domain to https://site.org i am getting error

    Thanks for any Help in advance so where will be the problem? how i am getting two url’s site.org/wp-adminwp-admin. may i know the root cause for this problem, Thanks again

    Thread Starter Kanth

    (@srikanthpulluru)

    dint find any solution to solve the above issue, please anyone assist me how to solve the issue here is my .htaccess code

    # Use PHP 5.4
    AddType application/x-httpd-php54 .php 
    
    # BEGIN s2Member GZIP exclusions
    <IfModule mod_rewrite.c>
    	RewriteEngine on
    	RewriteBase /
    	RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
    	RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
    	RewriteRule .* - [E=no-gzip:1]
    </IfModule>
    # END s2Member GZIP exclusions
    
    # BEGIN SSL
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
    # END SSL
    
    # BEGIN WordPress
    RewriteEngine on
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^siteslogin$ https://site.org/wp-login.php [NC,L]
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    <FilesMatch "\.pdf$">
      header set x-robots-tag: noindex
    </FilesMatch>
    # END WordPress
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I can’t reproduce this. I have SSL for login on my main domain and it’s working as expected, no issues.

    # BEGIN SSL
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
    # END SSL

    That’s not a great way around it.

    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]

    You’re missinfg a / between the URI and the $1

    (Mind you I do it this way:

    RewriteCond %{HTTP_HOST} ^site.org
    RewriteCond %{SERVER_PORT} !443
    RewriteRule ^(.*)$ https://site.org/$1 [R,L]

    )

    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]

    That is the problem. IMO, in this case {REQUEST_URI} and $1 are the same thing. Do one OR the other, not both.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Oh! Hah! thanks, jkhongusc!

    Thread Starter Kanth

    (@srikanthpulluru)

    Thanks a lot Its fixed my problem :):)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Displaying URL's twice on my website (https://site.org/wp-adminwp-admin)’ is closed to new replies.