Magento Remove .html from the product page urls and category page urls - magento

My urls are starting to get a bit lengthy and I would like to remove the .html extension from the end of the urls to make them a bit shorter. I cannot find the setting to remove or modify this option. Please help me find the code or setting to make this change. I am using Magento 1.9.1.

It's really easy to do. I'm not sure how Magento handles redirects after you modify the url extensions but you may want to consider that before changing urls on a live site, it may affect indexed urls. System > Config > Catalog > Catalog > Search Engine Optimization. There, you can modify product url and category url suffixes. When you're done, make sure to go to System > Index Management and reindex all the data. Then it's good practice to clear the cache as well (System > Cache Management).

Related

Url Rewrite of a CMS page in Magento

As a new magento developer I'm using a theme to develop my store. I want to change the URL key of CMS page about. I followed the steps written here but I can't find my layout file for about page on the theme directory or base directory for change XML URL tag.
How can I edit the layout file? Can anyone help me?
Actually that tutorial is a little confusing because there, they are showing an example of changing a URL for two different type of pages (CMS and system).
For changing the URL of a CMS page, like about in your case, it's enough that you proceed until point 12. In short:
First. you change the URL from: (main menu) CMS/Pages/Your_Page -> Url Key: newURL
Then, find the blocks that it is used (e.g footer) and change the URL accordingly.
Plus, in general working in Magento after changing things like page URLs you need to do a reindex and in case of using cache you have to refresh/remove your cached data. Both could be found under System tab (Cache Management & Index Management).

*some* magento links pointing to old domain

I have just moved a magento site from one domain to the new one. Steps so far...
Backup the database and restore the database on the new domain. Change the core_config_base table for secure and unsecure base urls
Upload source files
Update the local.xml with new database information
Cleared cache
Now I can go to the site and everything is showing up fine on the new domain. The main navigation is working as it should. When I click on a product, however, it goes to the old domain. Does anyone know why this might be happening?
Can you verify the links when you hover products are correct or in correct consistently? Is old base URL in all links I mean. Also check htaccess file for any directives containing the old domain. Also check to make sure no custom URL rewrites exist in the Magento admin Catalog → URL Rewrite Management .Once you verify htaccess or custom URL rewrites in Magento admin are not causing it, I can suggest other procedures to fix.
Probably your previous developer didn't follow all Magento standards while coding.
My suggestion is download your code and search for strings that equates to your previous domain.Also check in data base, as use of CMS blocks too might result in previous domain links.
Btw make sure you delete all caches
Rm -rf var/cache/*
Verify base URL and secure URL are correct in all scopes via drop down in Magento system configuration.

SEO: category and product path (URL) - Magento

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

Magento 1.7.0.2 Index Management overwriting URL Rewrites

I have a slight problem with the Index Management on Magento 1.7.0.2.
I have quite a few custom URL rewrites for categories.
When I re-index the Catalog URL Rewrites it deletes all of my custom rewrites for the categories and sets them back to the system default.
Before re-indexing: http://i.imgur.com/4s1oo.png
After re-indexing: http://i.imgur.com/0U8zE.png
Also on a side note, What are the differences between cache management and index management?
Any help is appreciated, thanks.
Magento is changing those because you didn't change the id_path. If you specify different id_path value for your Custom Category rewrite, Magento will not overwrite it.
Also what you want to achieve could be done with Custom Url Rewrite. For example:
request path: catalog/category/view/id/118
target path: 'corporate'
In this way you're making a destination of system rewrite yours start point.
This was driving me absolutely bonkers until I figured out a nice little work-around.
I create my new object (in my case it was a category for the top nav
I go to URL Rewrite and note the ID Path of the new category
I delete the system generated URL Rewrite
I create a custom Rewrite specifying the ID Path of the deleted object, The request path, and then the path to the desired URL
I then go to phpmyadmin > core_url_rewrite and find my newly created custom Rewrite
I change the store_id to 0 (not changing anything else)
I then go back to Magento and run a reindex. This creates a new system generated Rewrite with a higher url_rewrite_id (see in phpmyadmin > core_url_rewrite table)
I then create my page with the desired path
Reindex / flush caches and presto.. my top nav now has a menu item to my new page.

Magento checkout cart feature control

I have a site, 1.5 magento, and the cart functionality (and the customer account functionality) seem to be disabled. When i attempt to go to the url 'checkout/cart', just the homepage displays.
Ive checked all the usual suspects..including:
checked the url_rewrites table (there is one entry in their referencing checkout/cart...but goes from checkout/cart to checkout/cart, so dont see this is an issue, but did edit it just to rule it out)
enabling/disabling of the module itself, looking at both the etc/modules files and removing, and checking the module listing in system->config->advanced area.
trying to step through the code..try detect where the change over of pagedata occurs - struggling here.
looking for certain terms in the codebase...and database SQL file.
the htaccess file, looking for a rewrite
local/community modules..and any rewriting of the checkout
Im starting to think a hack is in place here to show the homepage when visiting checkout url. The url : www.mysite.co.uk/checkout/cart remains in the address bar, but i see homepage data.
Anyone know where else i can check...or easily locate the cause of this issue?
Many thanks
S
Did you look in backend under Configuration -> Sales -> Checkout ?
There is a field called "Enable One-Page Checkout" which has to be enabled. If you disable it, your store will just run fine but neither registered customers nor guests can check out anymore.
Turns out this was rewrites added to the rewrite table manually. Didnt find them at first.

Resources