Is it possible to create urls for category as subdomain, for example now it is:
mystore.com/category
I would like it to be
category.mystore.com
I know there is multistore option, so I could create more websites and set root directory for every category, but there would be problem with cart sharing, next thing is site is has 2 languages - so I'm using multi store for site translation
There's no way to achieve this out of the box, but this can be done using a custom router. Create a custom router and insert it before the standard router. In your custom router, check the subdomain of the request. If it matches a category URL key (or whatever other criteria you'd like to use), rewrite the request to that of a standard category page (i.e. /catalog/category/view/id/123/). Keep in mind that your users will probably leave the subdomain when they click on a link because your base URL will not include the category-specific subdomain. Take a look at Mage_Cms_Controller_Router as an example of a custom router.
Related
im trying to have the same backend but with multiple subdomains. first i created one of my subdomains in the backend has showen in this image above.
And is working fine, but not i need the same backend with another subdomain for example "sync.mydomain.com", but i cant find any information on magento docs in configuring custom admin url in multiple domains. Does someone have any idea if it is possible to configure it on magento?
In order to make magento work with multiple domains, you need to make few steps.
System->Manage Stores -> Create Store Fill in the store fields,
taking care that the Website and Root Category are the same as your
primary site.store. Save Store
Create Store View Fill in the store view fields, change Store to the
new store you just created, give your store view a Name (spaces ok),
a code and make sure it’s enabled, after that save the store view.
System->Configuration->Web Change the scope on the upper left to your newly created store view
Change Unsecure->Base URL to your second domain (You’ll have to uncheck Use Website)
Change Secure->Base URL to your second domain (You’ll have to uncheck Use Website)
Save Config
Open the .htaccess at the root of your Magento install
Add the following, obviously changing the values with your own:
SetEnvIf Host www.mysecondarydomain.com MAGE_RUN_CODE=yoursecondarystoreviewcode
SetEnvIf Host ^mysecondarydomain.com MAGE_RUN_CODE=yoursecondarystoreviewcode
Clear the cache and re-index the site.
Here is the article for more information:
http://madproject.com/programming/magento-one-site-multiple-domains/
I'm building a dual language store front- French/English. Originally I was going to create a sub directory mydomainname.com/fr.
However now I'm considering using Magento's URL Rewrite Management. Since I only have English and French it would be easy to use this to rewrite my cms pages, and url rewrite on product/category pages is built in.
Does anyone see in disadvantage to doing this rather than creating a subdirectory? or any advantage for that matter?
Magento supports this ability already through the concept of Store Views. It should be very simple to implement this and not require any URL rewrites. Basically you just need to create two Store Views, one called 'en' and one called 'fr' and then in your index.php detect which one to send the customer to, using HTTP_ACCEPT_LANGUAGE as Magento recommends, or custom logic like GeoIP, etc.
In order to create language-specific CMS pages and static blocks, you must create alternate versions that are tied to the appropriate Store Views. This means you will have two CMS pages with the same URL key, but each is tied to a different Store View. URL Rewrite Management would be a good way to create alternate URL keys that can load the CMS page based on a localized key.
I am working on FAQ custom module which lists all FAQ related with particular product.
The following is the my product view page link:
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501.html
And following is the my custom FAQ page link for this product:
http://mydomain.com/magentoassignments/index.php/faqmodule/product/list/id/1/category/3/
Now, my requirement is create above link SEO friendly respective with product like following:
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faqmodule.html
OR
http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faq.html
How can I achieve this?
First of all you have to create your custom rewrite in admin.
Just go to url rewrite management and choose custom url rewrite type
Give unique id path in id path field
In request path give this http://mydomain.com/magentoassignments/index.php/watches/titan-suprimo-501/faq.html
This is your request path from frontend
And in target path give this http://mydomain.com/magentoassignments/index.php/faqmodule/product/list/id/1/category/3/
internally magento use your target path.
And save your url rewrite
I have 1 website for now. Its URL is www.test.com, for example.
I want to create second website on the same domain adding store codes to URLs. So my URLs will be
www.test.com/first/
www.test.com/second/
But as I can see all my previous URLs will show 404 on their open. So if I open
www.test.com/product.html
it will show 404. It is not good because I loose my SEO.
How can I create redirects so if user opens
www.test.com/product.html
he will be automatically redirected to default website, like
www.test.com/first/product.html
Shall I have any issues with such redirects? (Like API will not work)
Or is it possible for URL
www.test.com/product.html
to show product from default website, if exists?
Magento has a very good system for SEO.
For Rewrite Management these are the steps:
1.Loginto Admin.
2.Move mouse over Catalog and you will find a drop down.
3 Select URL Rewrite management.
Catalog >> UrlRewrite Management
4.Then click on ADD URL Rewrite Button.
5.Then on next screen select custom from option provided
Create URL Rewrite : Select Custom
Now following important fields and values that should go:
Request Path (Old URL ) Target Path ( New URL ) redirect (Permanent 301).
Note : This approach will be good if you have few products but if you have too many product then some .htaccess rule is recommended.
I have one or two categries in magento but these are not always showing up in URL.
Example:
When I navigate to a product page the path looks like this:
.../cat/subcat/product.html
However, when I click a product directly from the frontpage (newest, featured), then the URL structure looks like this:
.../product.html
My first thought was to deactivate, that the category is showing up within the URL (backend seo tab).
Well, I'm trying to seo the shop and not very happy with this solution. I'd like to have always a clear structured URL.
Any ideas?
If your website has a complicated structure, you will have multiply URL for a single product, just like you mentioned. This situation may damage your website's profile to the customer, but it won't be any problems to Search Engine. The latest version of Magento provides canonical URL support for product and category. You may access the configuration under
System -> Configuration -> Catalog -> Search Engine Optimizations -> Use Canonical Like Meta Tag for Products
If you are going to eliminate this situation throughly, you can create URL writes to the URL you want through a 403 status code, which also will tell search engine that the content has been permanently migrate to the target URL and user can only access the URL you want to present to them.
The problem you have is that a product can belong to multiple categories so what category should be used in this case?
Depending on how you are outputting the newest, featured etc.. you could use a static block instead and simply put in the products manually which you can then link to the product in the category you want. This is a manual process but one that would work for what you want to do without requiring custom work.
Cheers
Adam