Magento migration from single store to multistore. Redirects - magento

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.

Related

URL rewrites not working and keep changing the URL extension

I cannot get the URL rewrite in Magento to work correctly at all. I'm trying to redirect a category to a CMS page and at first try it works fine. After I refresh, it starts to change the URL extensions to something completely different than what's shown for the category URL. I've tried clearing the cache and reindexing the URL rewrite but that seems to change it again!
And if I do try to change the URL rewrite to this new, random, made up one that's being automatically inputted - it changes it again! I'm so confused here..
Fixing weird URL Rewrites
Sometimes when you make changes to your products, or enable a certain extension, Magento might start to rewrite all your URLs to include a suffix "-1" or some other number. Within the URL Rewrites, Magento differentiates between System URLs and Custom URLs. If the System URLs are broken like this, you should not fix this by adding new Custom URLs.
Instead, open up phpMyAdmin, create a backup of your Magento database, and flush the Magento table core_url_rewrite (so that it becomes totally empty). Immediately afterwards, refresh the Catalog Url Rewrites under Index Management. This will regenerate all System URLs.
You can also try to redirect through the .htaccess.
Redirect 301 /site-URL-to-redirect www.site.com/url-destination
There are two ways to redirect your category page to cms.
Using Magento native URL rewrite managment.
In Magento 1.x go to
admin -> catalog -> url rewrite managment -> add new url
select custom in Create URL Rewrite: drop down and then give your categoy url as request and cms page as target.
Using .htaccess file. Add this line of code into the file .htaccess:
Redirect category-url cms-page-url

URL masking with MAGENTO

Is there any way of url masking with Magento.
For Eg :
Main website :
www.magento.com
another domain :
subdomain.magento.com
Now when i open www.magento.com website is masked/redirect to subdomain.magento.com with all the content of www.magento.com, and in URL it will display subdomain.magento.com.
let me know if this is possible in case of Magento without creating multiplestores.
This works for me :
Setup your URLs as “pointers” – all pointing to your Magento
installation’s root directory
Navigate to your Magento Admin under System > Configuration > Web >
Url Options and select “No” for “Auto-redirect to Base URL”.
That’s it! It should work exactly how you want it to.

Magento 1.9 Navigation link to home page

How would I make a link from the main navigation to the home page (or any other page)?
I can do it in the Admin using
Catalog -> URL Rewrite Management -> Add URL Rewrite
Then creating a Custom Rewrite.
I use the hardcoded link to the homepage http:\\somedomain\magento as the Target Path and set it to Permanent 301 Redirect.
Then I delete the original System rewrite for the home category.
This works until it's reindexed, then the original System rewrite for that category comes back and the Custom one I created doesn't work anymore.
I found out what I was doing wrong. I shouldn't have deleted the original system rewrite. These are the steps to make custom links from the navigation menu.
1) Copy the Target Path from the System Category rewrite
2) Change the redirect to Permanent 301 for the System Category rewrite
3) Create a new Custom rewrite.
4) In the new Custom rewrite, paste the copy from #1 into Request Path
5) For ID Path put the URL Key for the page to be linked, for default page is /
6) For Target Path put the path to the new page (e.g / or /contacts)
This article explains it in detail : http://go.magento.com/support/kb/entry/name/adding-page-links-in-the-navigation-bar/

Magento - How to create a custom url based on attributes?

In the Magento Admin > Catalogue > Attributes > Attribute Sets, we have a set of attributes for "Manufacturers" which group products under designers.
I am trying to create a hyperlink that maps a custom route to an attribute query like so
this is route i want:
{{base_url}}/designers/some-designer-name/
this is what it will map to:
{{base_url}}/?designer=136
I have tried creating a custom url rewrite under Catalogue > URL Rewrite Management with no luck.
Please refer this this may help you
http://www.atwix.com/magento/products-list-cms/
if you want to create custom url, than follow the steps...
From the Admin panel, select Catalog >> URL Rewrite Management
In the upper-right corner, click the Add URL Rewrite button
In the Add New URL Rewrite section, set Create URL Rewrite to “for Product.”
Find the product in the list below and click to open the record and click Skip Category Selection button
In the URL Rewrite section, do some following things:
a.In the Request Path field, enter the new value for the updated URL. The Request Path must be unique for each rewrite.
b.Set Redirect to one of the following:
Temporary (302)
Permanent (301)
For your own reference, enter a brief description of the rewrite.
click to save and enjoy ;)

magento category url,admin 404 error

I am a magento newbie.
I've observed that when I make an installation of magento by copying all contents of the extraction directly to localhost.... i.e (when app, media, skin, index.php etc all pasted directly in localhost) I am unable to access the admin by simply typing in localhost/admin.
Whereas I have to type in localhost/index.php/admin to get into the admin panel.
Also when i click on any category i have the same problem.
I have to append index.php/ before the category name to get the category link working.
Can anyone please tell me how to get them working.
Check your Base URL in the Admin Panel, go to System | Configuration | Web and make sure the Secure and Unsecure Base URL does not include the 'index.php' part.
If you do not have index.php in my secure or unsecure web configuration and this happening on front end and back end, try to enable url rewrites and see if that solves it. You need mod_rewrite enabled on your localhost.
What is your local server?

Resources