Page 1 of 1
Multistore:With www URL working but no www not {SOLVED}
Posted: Fri Oct 28, 2011 4:51 pm
by 2deep2handle
http://www.theskydiveshop.com.au is the install of opencart, and the actual URL displayed is
http://www.theskydiveshop.com.au/index. ... ommon/home
http://www.tonfly.com.au
and
http://www.turbolenza.com.auwork as multi-stores and display in the URL bar "
http://www.tonfly.com.au/index.php?route=common/home/" and the same for turbolenza.
but if i just type
tonfly.com.au or
turbolenza.com.au without the www, I am redirected to
http://www.theskydiveshop.com.au/index. ... ommon/home, the open cart root install.

both domains are pointed to my hosts nameservers, and i have added both as addon domains in my hosting cpanel
what have i done wrong?, or is there a known bug or something for this version im overlooking?
USING version 1.4.9 clean install
What can i do to fix this?
Thanks guys
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Fri Oct 28, 2011 4:56 pm
by uksitebuilder
what have you got in your .htaccess file in the store root (if you have one) ?
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Sat Oct 29, 2011 8:08 am
by 2deep2handle
Hey UK Site Builder thanks for the help.
Upon inspection i realised i actually still have .htaccess.txt as well as the renamed .htaccess
Would this affect it? which would it read?
Here first is the .txt(old access)
Code: Select all
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|txt)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
here is the renamed plain htaccess
Code: Select all
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|txt)">
Order deny,allow
Deny from all
</FilesMatch>
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
# Begin HTML to PHP redirect
RedirectMatch 301 /about.html http://www.theskydiveshop.com.au/about-us?
RedirectMatch 301 /aff.html http://www.theskydiveshop.com.au/skydiving-courses?
RedirectMatch 301 /booking.html http://www.theskydiveshop.com.au?
RedirectMatch 301 /coffs.html http://www.theskydiveshop.com.au/tandem-skydive/australia/coffs-harbour?
RedirectMatch 301 /compare.html http://www.theskydiveshop.com.au/compare?
RedirectMatch 301 /contact.html http://www.theskydiveshop.com.au/index.php?route=information/contact
RedirectMatch 301 /coolum.html http://www.theskydiveshop.com.au/tandem-skydive/australia/sunshine-coast?
RedirectMatch 301 /faq.html http://www.theskydiveshop.com.au/faq?
RedirectMatch 301 /goldcoast.html http://www.theskydiveshop.com.au/tandem-skydive/australia/gold-coast?
RedirectMatch 301 /goskydive.html http://www.theskydiveshop.com.au/tandem-skydive/australia/go-skydive-byron-bay?
RedirectMatch 301 index.html http://www.theskydiveshop.com.au/index.php?route=common/home
RedirectMatch 301 /locations.html http://www.theskydiveshop.com.au/locations?
RedirectMatch 301 /melbourne.html http://www.theskydiveshop.com.au/tandem-skydive/australia/melbourne?
RedirectMatch 301 /moruya.html http://www.theskydiveshop.com.au/tandem-skydive/australia/moruya?
RedirectMatch 301 /muruya.html http://www.theskydiveshop.com.au/tandem-skydive/australia/moruya?
RedirectMatch 301 /nzone.html http://www.theskydiveshop.com.au/tandem-skydive/new-zealand?
RedirectMatch 301 /rainbowbeach.html http://www.theskydiveshop.com.au/tandem-skydive/australia/rainbow-beach?
RedirectMatch 301 /ramblers.html http://www.theskydiveshop.com.au/tandem-skydive/australia/ramblers-toogoolawah?
RedirectMatch 301 /sydney.html http://www.theskydiveshop.com.au/tandem-skydive/australia/sydney?
RedirectMatch 301 /tandem.html http://www.theskydiveshop.com.au/tandem?
RedirectMatch 301 /terms.html http://www.theskydiveshop.com.au/terms?
RedirectMatch 301 /thanks.html http://www.theskydiveshop.com.au?
RedirectMatch 301 /toogoolawah.html http://www.theskydiveshop.com.au/tandem-skydive/australia/ramblers-toogoolawah?
RedirectMatch 301 /townsvilleabout.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /townsvilleaff.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /townsvilletm.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /wanaka.html http://www.theskydiveshop.com.au/tandem-skydive/new-zealand/lake-wanaka?
#End HTML to PHP redirect
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
RewriteCond %{HTTP_HOST} ^tonfly.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^www.tonfly.com.au$
RewriteRule ^/?$ "\/index\.php\?route\=common\/home\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^turbolenza.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^www.turbolenza.com.au$
RewriteRule ^/?$ "http\:\/\/www\.turbolenza\.com\.au\/index\.php\?route\=common\/home\/\ " [R=301,L]
Weird because it looks like both rewrites are there, and if it was reading from the .txt you would think that neither would work as neither rewrite is there?
Thanks again UK sitebuilder
2Deep
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Sat Oct 29, 2011 3:39 pm
by uksitebuilder
Dont worry about the .htaccess.txt file, you can delete it if you wish
in your .htaccess, replace it's contents with the following
Code: Select all
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log|txt)">
Order deny,allow
Deny from all
</FilesMatch>
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
# Begin HTML to PHP redirect
RedirectMatch 301 /about.html http://www.theskydiveshop.com.au/about-us?
RedirectMatch 301 /aff.html http://www.theskydiveshop.com.au/skydiving-courses?
RedirectMatch 301 /booking.html http://www.theskydiveshop.com.au?
RedirectMatch 301 /coffs.html http://www.theskydiveshop.com.au/tandem-skydive/australia/coffs-harbour?
RedirectMatch 301 /compare.html http://www.theskydiveshop.com.au/compare?
RedirectMatch 301 /contact.html http://www.theskydiveshop.com.au/index.php?route=information/contact
RedirectMatch 301 /coolum.html http://www.theskydiveshop.com.au/tandem-skydive/australia/sunshine-coast?
RedirectMatch 301 /faq.html http://www.theskydiveshop.com.au/faq?
RedirectMatch 301 /goldcoast.html http://www.theskydiveshop.com.au/tandem-skydive/australia/gold-coast?
RedirectMatch 301 /goskydive.html http://www.theskydiveshop.com.au/tandem-skydive/australia/go-skydive-byron-bay?
RedirectMatch 301 index.html http://www.theskydiveshop.com.au/index.php?route=common/home
RedirectMatch 301 /locations.html http://www.theskydiveshop.com.au/locations?
RedirectMatch 301 /melbourne.html http://www.theskydiveshop.com.au/tandem-skydive/australia/melbourne?
RedirectMatch 301 /moruya.html http://www.theskydiveshop.com.au/tandem-skydive/australia/moruya?
RedirectMatch 301 /muruya.html http://www.theskydiveshop.com.au/tandem-skydive/australia/moruya?
RedirectMatch 301 /nzone.html http://www.theskydiveshop.com.au/tandem-skydive/new-zealand?
RedirectMatch 301 /rainbowbeach.html http://www.theskydiveshop.com.au/tandem-skydive/australia/rainbow-beach?
RedirectMatch 301 /ramblers.html http://www.theskydiveshop.com.au/tandem-skydive/australia/ramblers-toogoolawah?
RedirectMatch 301 /sydney.html http://www.theskydiveshop.com.au/tandem-skydive/australia/sydney?
RedirectMatch 301 /tandem.html http://www.theskydiveshop.com.au/tandem?
RedirectMatch 301 /terms.html http://www.theskydiveshop.com.au/terms?
RedirectMatch 301 /thanks.html http://www.theskydiveshop.com.au?
RedirectMatch 301 /toogoolawah.html http://www.theskydiveshop.com.au/tandem-skydive/australia/ramblers-toogoolawah?
RedirectMatch 301 /townsvilleabout.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /townsvilleaff.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /townsvilletm.html http://www.theskydiveshop.com.au/tandem-skydive/australia/townsville?
RedirectMatch 301 /wanaka.html http://www.theskydiveshop.com.au/tandem-skydive/new-zealand/lake-wanaka?
#End HTML to PHP redirect
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^theskydiveshop\.com\.au$
RewriteRule ^(.*)$ http://www.theskydiveshop.com.au/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^tonfly\.com\.au$
RewriteRule ^(.*)$ http://www.tonfly.com.au/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^turbolenza\.com\.au$
RewriteRule ^(.*)$ http://www.turbolenza.com.au/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Tue Nov 01, 2011 3:52 am
by 2deep2handle
i deleted the .txt
and forgot to mention the way redirect is set up neither
www.tubolenza or turbolenza works but takes me to the turbo template with 404 then if i lcick enter on either page it takes me to the right template with the shop
with tonfly www works but tonfly by itself with no www takes me to the root install (skydiveshop)
i tried replacing my .ht access file with the one you provided me, but it led me to get this error for both sites(not sure about the root)
any more ideas site builder? my redirects are wrong perhaps from c panel? look at my original image in my first post of the redirects, and go to all my sites theskdiveshop.com.au, turbolenza.com.au and tonfly.com.au with and without the www
Thanks mate
2Deep
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Tue Nov 01, 2011 4:24 am
by uksitebuilder
edited my post above - there was a stray [OR] at the end of a line that shouldn't have been there
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Tue Nov 01, 2011 7:27 am
by 2deep2handle
Your .htaccess now works, but all urls www or not go to the root install of open cart and yield the folling url
http://www.theskydiveshop.com.au/index. ... ommon/home (which is the right url but should display right store name and template for each store?
any more ideas mate?
must say your responses are incredibly quick and efficient too

any way for me to +rep your profile/account?
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Tue Nov 01, 2011 3:24 pm
by uksitebuilder
Hi,
Can you just try commenting out the following line
Code: Select all
RedirectMatch 301 index.html http://www.theskydiveshop.com.au/index.php?route=common/home
You may want to pop the following at the top of the file if your server isn't set-up to use index.php as the default home page
Re: Multi-store - www.shops.com.au work but shops.com.au doe
Posted: Tue Nov 01, 2011 10:08 pm
by 2deep2handle
UKsitebuilder you are
THE MAN
I removed the line from the .htaccess file you told me too(the root redirect), which altered nothing.
Then (with the line missing you told me to remove) added the DirectoryIndex line you provided me with to the top of my .htaccess file, and not only has it made all 3 sites work with or without the www, but also none of them now have the stupid opencart extension after their domains.
ie now appear as
www.theskydiveshop.com.au instead of
www.theskydiveshop.com.au/route=common/home or some garbage.
You are too good man!
Thanks sooooooooooooo much
2Deep
SOLVED
Re: Multistore:With www URL working but no www not {SOLVED}
Posted: Sat Mar 17, 2012 1:55 pm
by steveconti1
Hey there..!!
Thank you for sharing this with us..!! It was truly very interesting and informative stuff..!!