Web design & development studio
  • Home
  • Testimonials
  • Services
  • Portfolio
  • Tutorials
  • Projects
  • Contact
SEO friendly URLs in OpenCart that works
Jan 19
Thanushka 5 Responses Permalink

SEO friendly URLs in OpenCart that works

Click here for demo

Rename or Create the .htaccess file

The opencart installation gives you a file named .htaccess.txt Rename it to .htaccess and upload to your site’s root where opencart is hosted.

It can be located in the upload folder.

Sometimes the .htaccess file is hidden by your operating system. You will have to

To see hidden files on a Mac:

http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/

 

If you cannot locate your .htacccess file, Create one.

  • Open a text editor like Note pad or TextEdit
  • Copy the following code OR download it as a .txt (compressed to a .zip file) here: htaccess.txt
  • name the file .htaccess instead of .txt or .rtf and save it, and then upload to your server.

 

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files

Order deny,allow
#Deny from all

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule sitemap.xml /index.php?route=feed/google_sitemap
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an “Internal Server Error 500″ after enabling any of the following settings, restore the # as this means your host doesn’t allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

 

 

Enable the ‘Use SEO URLs’ option in your admin settings

  • Go to Admin –> System Dtropdown –> Settings and click ‘edit’.opencart admin select your site location
  • Go to server tab and select ‘Yes’ for   ‘Use SEO URLs’

    Select YES for use SEO URLs in server tab

Finally, Add some SEO friendly tags to your products and categories in the admin. (it’s under the ‘data tab)

in data tab add seo key words for URLs in opencart products

 

 

Visit your store and test your page. Click here for demo

About the author

Thanushka Thanushka More posts by this author
OpenCart Web Development
Tweet
Enabling the seo friendly URLs in OpenCart isn’t just a click on the admin panel. This tutorial shows how to get them working using 3 simple steps. " class="pin-it-button" count-layout="horizontal"> Permalink Thanushka

Recent Posts

  • Custom product search with custom filters / options for OpenCart
    Custom product search with custom filters / options for OpenCart
  • Flyer, Brochure Design and Templates
    Flyer, Brochure Design and Templates
  • Responsive Web Design / Graphic design
    Responsive Web Design / Graphic design
5 Responses to SEO friendly URLs in OpenCart that works
  • Reply
    ehaze September 9, 2012

    To rename the file in OSX Mountain Lion, I had to do the following:
    2 finger click on the file –> Get Info –> Name & Extension section, remove .txt from the file name. Thanks for the post!

  • Reply
    Serg Forum August 26, 2012

    Receiving 500 Internal Server Error but have corrected it by telling my Host to Enable Mode_Rewrite.
    Thanks for the tutorial

  • Reply
    Gices Abraham July 27, 2012

    As Subash said, the SEO friendly URLs will only work for the products and categories but things like when you click on the Home button or logo to return to the homepage remain unfriendly. Therefore you need to manually fix all menu links or static pages that you have.

  • Reply
    Subash April 3, 2012

    Clearly explained and works like that…but I wanted to use SEO friendly URLs for all menus like Home, Account, Logout, Information and other links so I worked around a little bit and got that working…if you want that you may find it here

    • Reply
      thanuadmin April 28, 2013

      As Gices said, SEO url only work (automatically) for products and categories. You need to manually fix all menu links or static page.

Leave a comment

Your email address will not be published.

Click here to cancel reply.

POST COMMENT


8 + one =

OpenCart Extensions

Advertisement
GET NOTICED ONLINE!
Blissful Interfaces. A Professional Web Design Company

Recent Tutorials

  • Custom product search with custom filters / options for OpenCart
    Custom product search with custom filters / options for OpenCart
  • How to make embedded videos in WordPress responsive
    How to make embedded videos in WordPress responsive
  • WordPress All in one events calendar Warning: Call-time pass-by-reference has been deprecated in class-ai1ec-events-helper.php
    WordPress All in one events calendar Warning: Call-time pass-by-reference has been deprecated in class-ai1ec-events-helper.php
  • SEO friendly URLs in OpenCart that works
    SEO friendly URLs in OpenCart that works
  • Making WordPress video, image gallery / slideshows responsive

Our Products

Advertisement

Login

  • Lost Password
Follow Us on behanceFollow Us on deviantartFollow Us on facebookFollow Us on linkedinFollow Us on rssFollow Us on twitter
[email protected]
  • HOME
  • SERVICES
  • PORTFOLIO
  • BLOG
  • PROJECTS
  • CONTACT
Copyright All Rights Reserved © 2012