But I now have a problem which I can't find a solution for but which seems fairly common.
We had a problem in that we have a store: www.miwk.com which is hosted on www.miwkpublishing.com/store/
If people entered via 'www.miwk.com' then they couldn't click 'add to basket' from the home page.
So searching here I found the .htaccess fix and applied it. I also tweaked both config files in the root and in admin.
I got home this evening to find I can't log into the admin panel. When I login it clears the fields and the url changes to http://www.miwkpublishing.com/store/adm ... mmon/login
The help here advises adding www. to the URLs in the config files.
I've done this, but it still won't let me log in as an admin.
The rest of the shop seems to be working fine, but I'm getting quite panicky now as I just can't get into the thing.
The .htaccess now reads as:
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)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
Options +FollowSymlinks
Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} ^miwkpublishing.com [NC]
RewriteRule ^(.*)$ http://www.miwkpublishing.com/store/$1 [L,R=301]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
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 any of the following settings, 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
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://www.miwkpublishing.com/store/admin/');
define('HTTP_CATALOG', 'http://www.miwkpublishing.com/store/');
// HTTPS
define('HTTPS_SERVER', 'http://www.miwkpublishing.com/store/admin/');
define('HTTPS_CATALOG', 'http://www.miwkpublishing.com/store/');
// DIR
define('DIR_APPLICATION', '/home/users/uks/html/miwkpublishing.com/store/admin/');
define('DIR_SYSTEM', '/home/users/uks/html/miwkpublishing.com/store/system/');
define('DIR_DATABASE', '/home/users/uks/html/miwkpublishing.com/store/system/database/');
define('DIR_LANGUAGE', '/home/users/uks/html/miwkpublishing.com/store/admin/language/');
define('DIR_TEMPLATE', '/home/users/uks/html/miwkpublishing.com/store/admin/view/template/');
define('DIR_CONFIG', '/home/users/uks/html/miwkpublishing.com/store/system/config/');
define('DIR_IMAGE', '/home/users/uks/html/miwkpublishing.com/store/image/');
define('DIR_CACHE', '/home/users/uks/html/miwkpublishing.com/store/system/cache/');
define('DIR_DOWNLOAD', '/home/users/uks/html/miwkpublishing.com/store/download/');
define('DIR_LOGS', '/home/users/uks/html/miwkpublishing.com/store/system/logs/');
define('DIR_CATALOG', '/home/users/uks/html/miwkpublishing.com/store/catalog/');
Can anyone identify anything obvious here? It's so frustrating that I got this far without having to ask!