For directory organisation reasons, I naively placed my Abantecart site in a subdirectory named the same name as my domain (including fullstops).
ie: So the full website URL is now hxxp://www.mysite.com/www.mysite.com/ (nb: "http" is modified as forum didn't allow link format)
The site works completely, but I want to use the base domain only. I thought I could get it to use the base domain by changing the site address in the admin settings, but it doesn't seem to redirect when entering the base domain URL in admin.
I played with .htaccess, and finally I can now TYPE the base domain and get access to the site at that same URL ... -->hxxp://www.mysite.com (and get the URL to show the same in the browser).
BUT ..... once I click on the site logo, home, categories menu, etc, the browser retrieves the site and shows the URL from the subdirectory again
ie:
-->hxxp://www.mysite.com/www.mysite.com/
I have wasted weeks on this now in playing with the htaccess code, but unfortunately I am no expert of htaccess and nothing seems to work.
Could someone please help me?
My base directory .htaccess is this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/www\.mysite\.com/.
RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.
RewriteRule ^(.*)$ \/www\.mysite\.com\/$1 [L]
I also have the following in the subdirectory htaccess file:
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L]
The site only works when both complete sets of htaccess code are used. As soon as I delete any lines of either file, no redirections are possible.
Any help would be GREATLY appreciated. Thanks!