Post by 2deep2handle » Fri Oct 28, 2011 4:51 pm

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.



Image
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
Last edited by 2deep2handle on Tue Nov 01, 2011 10:10 pm, edited 1 time in total.

Newbie

Posts

Joined
Tue Oct 18, 2011 9:57 am

Post by uksitebuilder » Fri Oct 28, 2011 4:56 pm

what have you got in your .htaccess file in the store root (if you have one) ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by 2deep2handle » Sat Oct 29, 2011 8:08 am

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

Newbie

Posts

Joined
Tue Oct 18, 2011 9:57 am

Post by uksitebuilder » Sat Oct 29, 2011 3:39 pm

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

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by 2deep2handle » Tue Nov 01, 2011 3:52 am

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)

Image

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

Newbie

Posts

Joined
Tue Oct 18, 2011 9:57 am

Post by uksitebuilder » Tue Nov 01, 2011 4:24 am

edited my post above - there was a stray [OR] at the end of a line that shouldn't have been there

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by 2deep2handle » Tue Nov 01, 2011 7:27 am

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 :D any way for me to +rep your profile/account?

Newbie

Posts

Joined
Tue Oct 18, 2011 9:57 am

Post by uksitebuilder » Tue Nov 01, 2011 3:24 pm

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

Code: Select all

DirectoryIndex index.php

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by 2deep2handle » Tue Nov 01, 2011 10:08 pm

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

Newbie

Posts

Joined
Tue Oct 18, 2011 9:57 am

Post by steveconti1 » Sat Mar 17, 2012 1:55 pm

Hey there..!!
Thank you for sharing this with us..!! It was truly very interesting and informative stuff..!!

builder sunshine coast


Newbie

Posts

Joined
Sat Mar 17, 2012 1:47 pm
Location - Australia
Who is online

Users browsing this forum: Bing [Bot] and 118 guests