WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Displaying URL's twice on my website (https://site.org/wp-adminwp-admin) (12 posts)

  1. Srikanth Pulluru
    Member
    Posted 7 months ago #

    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

  2. https

    Did you change FROM http?

  3. Srikanth Pulluru
    Member
    Posted 7 months ago #

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

  4. How did you do that in WP?

  5. Srikanth Pulluru
    Member
    Posted 7 months ago #

    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

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

  7. Srikanth Pulluru
    Member
    Posted 7 months ago #

    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

  8. Srikanth Pulluru
    Member
    Posted 5 months ago #

    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
  9. 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]

    )

  10. jkhongusc
    Member
    Posted 5 months ago #

    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.

  11. Oh! Hah! thanks, jkhongusc!

  12. Srikanth Pulluru
    Member
    Posted 5 months ago #

    Thanks a lot Its fixed my problem :):)

Reply

You must log in to post.

About this Topic