Page 1 of 1

Remove Subdirectory from URL's/Links

Posted: Wed Apr 24, 2013 9:41 pm
by Den9191
Hello,

My opencart installation is installed in the "store" subdirectory. The reason for this is that I host quite some domains below my public_html (provider) so I couldn't install Opencart in that root.
If you go to http://www.website.com it works perfectly so that's not the problem. The issue is if you browse within the website it changes the URL to http://www.website.com/store/seo-category. If I remove /store manually so the URL is http://www.website.com/seo-category it also works fine.
Is there any way to remove that /store from all internal links? I already created a custom top menu without the /store. At the moment google sees that as dublicate content because both (with or without store) work and both are getting indexed. Is there a way to easily change the side menu links or do some kind of trick within the /htacess file?

Info:
New Installation
Version: 1.5.3.1
vqmod installed

Thanks in advance!

Den

Re: Remove Subdirectory from URL's/Links

Posted: Wed Apr 24, 2013 10:54 pm
by dmsims
You need to setup .htaccess so that it rewrites that domain to the subdirectory

Re: Remove Subdirectory from URL's/Links

Posted: Mon Apr 29, 2013 2:58 pm
by Den9191
Hi dmsims,

thanks for your reply.

So it is not prossible to completely remove /store from all links? Also for products which is:
http://www.site.com/store/product. I'd like to change that to http://www.site.com/product.

Thanks.

Den
http://www.telefoonhoesjes1.nl

Re: Remove Subdirectory from URL's/Links

Posted: Mon Apr 29, 2013 7:37 pm
by MarketInSG
look into your config.php file. Remove all /store from the links. All generated links will be without /store now :)

Re: Remove Subdirectory from URL's/Links

Posted: Mon Apr 29, 2013 8:26 pm
by Den9191
Thanks MarketInSG, that did the trick! :)

Re: Remove Subdirectory from URL's/Links

Posted: Fri Oct 11, 2013 10:32 am
by paisleybay
@MarketInSG

Hi

Please refer to your post dated April 29, 2013 in advice to "den9191" to remove subdirectory reference from all URL's/ links:
look into your config.php file. Remove all /store from the links. All generated links will be without /store now
Does this have to be done, along with suggestion of "dmsims" dated April 24, 2013 under same topic:
You need to setup .htaccess so that it rewrites that domain to the subdirectory
Kindly clarify. Thanks & regards.

Re: Remove Subdirectory from URL's/Links

Posted: Fri Oct 11, 2013 1:43 pm
by MarketInSG
you won't want to do both if your store is no longer in the sub directory

Re: Remove Subdirectory from URL's/Links

Posted: Fri Oct 11, 2013 3:48 pm
by paisleybay
Its like this.

My current store is working well at http://mysite.com. It is a "root" installation, using OC 1.5.4.1 & theme 'x'.
I have developed a revised version in a subdirectory "newstore", with OC 1.5.5.1 & theme 'y' (the OC version upgrade is necessary, as theme 'y' works only with that version & above). I now want to make the dev store live, replacing the current one.

I want the dev store to be in the sub-directory only - because my attempt to move it to root was disastrous (though I followed all the steps outlined in OC Docs & in Fora for moving). So the question: what do I need to do to
1. Make mysite.com load the new store in the sub-directory? AND
2. Get rid of the /newstore reference in URLS?

Thanks for any helpful pointers. Regards.

Re: Remove Subdirectory from URL's/Links

Posted: Fri Oct 11, 2013 3:52 pm
by MarketInSG
honestly, I would recommend you to just move it out of the folder. It's pretty easy.

1. Upload the installer folder will do and run website.com/install. It should upgrade.
2. Move the dev site out of the folder and it should then work

make a backup of database before you proceed

Re: Remove Subdirectory from URL's/Links

Posted: Sat Dec 08, 2018 9:33 pm
by shahid1122
https://shop.miagigyani.com/dir/
How can i remove the /dir/ from the url?