URL redirection

I am faced with a challenge. A client notified me of an issue with a website built on wordpress.

When the url is entered on a browser for example www.url.com it automatically redirects to www.url.com/main/ which make the wordpress dashboard not accessible.

Now what i did was log into the cpanel account got all the file out of the folder /main/ and wrote this htaccess line of a code

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

# END WordPress

yet when the url is entered it still redirects to the /main/ folder. how can i fixe this and most especially how can i make the wp-admin accessible.

The url is kaptainfoods.com

Just log into the Wordpress admin area(kaptainfoods.com/main/wp-admin/) and go to Settings → General.
From there, update the “Site Address (URL)” field to exclude the /main/ part of the URL.

If you want to move everything across, then make a copy of the files in the /main/ directory into the root directory via Cpanel. Then log back into the admin area and update both “Site Address (URL)” and “WordPress Address (URL)” to exclude the /main/ bit.

Make sure you have a back up before attempting any of this.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.