www.mysite.com
mysite.com
mysite.com/index.php
for me, all 3 pages are different.
how would I go about rectifying this?
301 redirect non www to www or the other way around. Put this in your .htaccess file:
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^.*$ [url="http://mysite.com"]http://mysite.com[/url] [L,R=301]
Index.php is not a problem, this is simply your homepage.
What Floris says will definitely work, but if you have this set correctly in your config.local.php I think it will automatically do this for you. How do you have that set?
Thanks,
Brandon
You’re right Brandon… I didn’t even think about that. I was already wondering why I didn’t have it in my .htaccess
It also depends upon (assuming Apache) your webserver configuration. You may not have access (you might have to have your host check), but the standard setup is:
ServerName: www.mydomain.com
ServerAlias: mydomain.com
This will then use the same “server” for requests to the IP address for either of those names.
[quote name='Flow' timestamp='1327835541' post='130168']
301 redirect non www to www or the other way around. Put this in your .htaccess file:
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^.*$ [url="http://mysite.com"]http://mysite.com[/url] [L,R=301]
Index.php is not a problem, this is simply your homepage.
[/quote]
thanks, but this didnt work for me
[quote name='brandonvd' timestamp='1327858031' post='130175']
What Floris says will definitely work, but if you have this set correctly in your config.local.php I think it will automatically do this for you. How do you have that set?
Thanks,
Brandon
[/quote]
thanks, this partly worked. mysite.com and www.mysite.com are still not the same. mysite.com is wrong
// Names of index files for administrative and customer areas
$config['admin_index'] = 'admin.php';
$config['customer_index'] = 'index.html';
this means that now when a customer clicks on the logo, instead of going to index.php, it goes to index.html (which is what I want because index.php was old version of store front)
I found the reason mysite.com looked different. The category photos in cscart were different to what was on the home page, which I edited manually. So I updated them and now mysite.com works fine
mysite.com/index.php is still wrong, but www.mysite.com/index.php redirects to mysite.com/index.html (this works but is it a bad idea?). But since the customer now does not use mysite.com/index.php, does it matter?
In your config.local.php, you need to do something like:
// Host and directory where software is installed on no-secure server
$config['http_host'] = 'www.your-domain.com';
$config['http_path'] = '';
// Host and directory where software is installed on secure server
$config['https_host'] = 'www.your-domain.com';
$config['https_path'] = '';
And you should be all set.
Brandon
Should, perhaps, but not. index.php displays categories (main block) that have not been used for a very long time. Everything else though seems ok. very weird