Wordpress Login page redirected to sub-directory, gets http 500 error?

413 Views Asked by At

When trying to access the /wp-admin page for my wordpress site, I get an Http 500 Error (login page only, all other pages work fine)

I noticed that it also redirects to the sub-directory that the wordpress installation is in...assuming this is part of the problem?

For example...I go to /wp-admin and end up at /wp/wp-login.php?redirect_to....

I've checked the .htaccess file and wp-config for any redirects, but can't see any.

Any idea what would cause this or where else I should be looking/what I should bbe looking for? I've searched a number of questions, articles etc to no avail.

Let me know if you have any questions/need more info.

Thanks!

EDIT: Here are the contents of the htaccess file

# Added by the pair Networks Software Installation Manager
AddType application/x-httpd-php .php


# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html.gz -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html.gz" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index-https.html" [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html -f
RewriteRule ^(.*) "/wp/wp-content/cache/supercache/%{SERVER_NAME}/wp/$1/index.html" [L]
</IfModule>

# END WPSuperCache

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>

# END WordPress
1

There are 1 best solutions below

5
On

Check the database table wp_options and the site URL and base URL should be http://example.com Alternatively, you can define site URL and base URL in wp-config.php too

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );