Multiple stores in Magento 1.7. Not directing to new website - magento-1.7

Multiple stores in Magento 1.7.
I am having issues setting this up.
I have set up via configuration two websites, store, store views etc and the url's in web config.
I have changed the A records on the domain to point to the magento website and I have as instructed changed index.php but when i type in my 2nd website address it just takes me to the main (original) website pages, if I change the default website in Magento it works! I can't be far off but I'm struggling now, any advice?
I've been told that in 1.7 I only need to alter index.php to make it work
Andrew

you must provide either store code or website code to server variable $_SERVER['MAGE_RUN_CODE'] or as first parameter to Mage::run() function in index.php file, for example if every subdomain of site has one store, you can accomplish this by:
$storeOrWebsiteCode = strtok($_SERVER['HTTP_HOST'],'.');
$_SERVER['MAGE_RUN_CODE'] = $storeOrWebsiteCode;
or
$storeOrWebsiteCode = strtok($_SERVER['HTTP_HOST'],'.');
Mage::run($storeOrWebsiteCode, 'website');
or
Mage::run($storeOrWebsiteCode, 'store');

Related

Magento 2 Changing Base URL breaks pages

I tried changing the base url and base secure url together with base path url and secure base path url but upon changing it from https://test.com/ to https://test.com/sh/shop it breaks all the pages in the frontend. Any solution for this? Would really appreaciate any help thanks
Got you.
So you want to create a multi site store.
Magento has this feature. You need to create two single store websites in magento admin.
1 will be test.com,
2nd will be test.com/sh/shop.
Check this for details : https://devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html
Base urls of both sites will be different, so this will not cause css issue

Create Store in magento

Hi I'm trying to create a website, store and store view in Magento 2. I've been watching youtube video on how to do it. But I'm just curious why is it my admin panel has this kind of prefix
As you can see below my website name I have (Code: aliexpress) may I know what this mean? In the video I'm watching they don't have this. Any idea regarding this?
Every website, store and store view has one unique identifier that is called code. in your case your website Name is Aliexpress according to that name code is aliexpress.
Website code is helpful when we want to run specific website in Multi-Website environment. you can open your index.php file in your Magento installation directory and find the below code.
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = '<your website code>';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
Using above code you can run specific website.

Redirects in Ektron 8.6.1

Has anyone played with the new redirect feature in Ektron 8.6?
We tested it (in 8.6.0) before upgrading and were happy with it. But when it came time to do the upgrade, Ektron had released 8.6.1, so we upgraded directly to that.
Now we are having trouble with the redirect feature. (Yes, we should have tested everything again in 8.6.1 before upgrading)
Now if we try to add a redirect rule for an existing page in the CMS, it does not work.
But if we create a redirect rule for a page the does not exist, then try to hit that address, the redirect works fine.
We need the redirects to work for existing pages in the CMS.
To clarify what "working" and "not working" means...
If I have an existing page in the CMS with manual alias of "/erc/lucien.apsx", I can create an entry in the redirect table like this...
Adding this entry generates no errors, but when I visit the page, all I see is the regular old page I created. NOT the Google site it should be redirecting to. I do not get any 404 errors.
But if I create a redirect entry for a page that does not already exist, like this...
It works perfectly. If I try to visit the /erc/fake.apsx address, I end up on the Google site, as expected.
(FYI, we create a "fake" page in the CMS for external content so we can attach metadata to it and make it searchable in taxonomies, but then provide a link to the "real" page. I want to use redirects here so users don't have to do this extra click)
I suspect it might be cache related -- the original URL gets cached as an alias, then subsequent requests to that URL are redirected to the quicklink without the need for a db look up. When you add the redirect, it’s probably not clearing the old item from the cache. I'd try an IIS reset after you add the URL redirect and see if that clears up the issue.
An "outside the box" (of Ektron) answer to this is to place the redirect at the web server rather than in the Aliases section of the Ektron CMS.
The server I work on uses IIS and I have this set up for several pages.

Adding more than 1000 301 redirects in drupal site

I am using drupal 6.
I worked on the site revamp for one of our clients and we needed to redirect the old site urls to relevant new site urls so that we do not loose the traffic. I have used path redirect module for same and added some of the urls.
The issue is we have more than 1000 urls to be added and there is no specific pattern (as old site was in asp.) so it would be 1 to 1 mapping for redirect. Adding it in url alias table via path redirect module is something which is hitting the site performance and again it is a manual process.
Is there any other better and optimal solution for this scenerio?
http://drupal.org/project/path_redirect_import
This module has import feature out of the box.
I'm interpreting this question as a question of performance (not a question of the ease of populating many redirects). Please correct me if I've misunderstood your question.
Put redirects in .htaccess
If you're using Apache, then your alternative is to put the redirects directly into your .htaccess configurations. There should be a similar configuration option for this for IIS as well.
This still means that you would have to create the 1 to 1 mapping for each redirect you want, but the redirects are not stored in your database so it saves hits to the db.
Advantages to using Path Redirect module
Note that the Path Redirect module can log when a redirect was last accessed. This statistic/tracking can help you remove redirects that are no longer in use in the long run.
There are posts on the Path Redirect issue queue that suggest that 1000 redirects should not be a problem but every setup is different. You will need to perform your own benchmarking to check the performance of your particular site.

Suggest idea for creating microsite in Joomla 1.5

I am having a site as http://www.test.com running in Joomla 1.5 . We are planning to have a microsite like
http://www.sub.test.com which has to have separate homepage with different contents .
Is that is possible with the following idea
Making a export of all the tables in my joomla and replacing jos with suband again importing them into the same Joomla database.
Writing a PHP script of identifying whether the Url tat i have entered in the browser is
http://www.test.com OR
http://www.sub.test.com
If test.com, then the $dbprefix would be jos OR if sub.test.com then the $dbprefix would be sub.
Will the above idea for creating a microsite is the correct one.
Just as another option, you could contain both sites in the exact same instance with a different template assigned to the micro site.
Set up a content category for the micro site, detect the request URL (most likely in the WebServer - best location, or in a DNS setting with a forward URL)
Assign all content items in the category with the new Template.
We regularly do this for a site that wants a blog site alongside the main website, but want a different look and feel.