Community Forums

Friendly URLs .htaccess help

Please post any issues you are having concerning installation or upgrade of OpenCart v1.x

Friendly URLs .htaccess help

Postby bikermunda » Fri Mar 09, 2012 12:29 pm

I am trying to enable the SEO URL`s but for some reason it is not working out, I have the .htaccess file on the server but it is still now working, what can i do to make it work ?
bikermunda
 
Posts: 56
Joined: Fri Jan 27, 2012 7:58 pm

Re: Friendly URLs .htaccess help

Postby JAY6390 » Fri Mar 09, 2012 12:41 pm

Have you renamed the file correctly to .htaccess?
Have you enabled SEO Urls in the SETTINGS?
Have you given products etc seo keywords?
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4879
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Friendly URLs .htaccess help

Postby Superior1 » Fri Mar 09, 2012 4:02 pm

I am also having a problem getting SEO URL's working? I am on v. 1.5.2.1 and all cats / products have SEO keywords (I used Deadcow SEO's seemingly very good extension) and htaccess is correctly named but when I set SEO URL's to yes on the server it works in one way but not in another:

The URL's are all coorect and SEO friendly, however whatever link I click I just get the home page but with a different URL?

This has been driving me a bit crazy as I had the same issue in 1.5.13 but thought the upgrade would resolve, which it didn't... Any advice very very welcome!

Thanks

C.
Superior1
 
Posts: 39
Joined: Sat Aug 27, 2011 4:39 am

Re: Friendly URLs .htaccess help

Postby bikermunda » Fri Mar 09, 2012 4:20 pm

JAY6390 wrote:Have you renamed the file correctly to .htaccess ?
Have you enabled SEO Urls in the SETTINGS?
Have you given products etc seo keywords?


I only have .htaccess file in VQMOD and Yes i have enabled SEO URLS (They are giving 404 error once the products is clicked on) and Yes i have given products SEO Keywords
bikermunda
 
Posts: 56
Joined: Fri Jan 27, 2012 7:58 pm

Re: Friendly URLs .htaccess help

Postby JAY6390 » Fri Mar 09, 2012 4:43 pm

Without the .htaccess file, you're not going to get seo urls to work. The contents of what should be in the .htaccess file in the root directory is found here
http://opencart.googlecode.com/svn/trun ... access.txt
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4879
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Friendly URLs .htaccess help

Postby JAY6390 » Fri Mar 09, 2012 4:45 pm

Superior1 wrote:I am also having a problem getting SEO URL's working? I am on v. 1.5.2.1 and all cats / products have SEO keywords (I used Deadcow SEO's seemingly very good extension) and htaccess is correctly named but when I set SEO URL's to yes on the server it works in one way but not in another:

The URL's are all coorect and SEO friendly, however whatever link I click I just get the home page but with a different URL?

This has been driving me a bit crazy as I had the same issue in 1.5.13 but thought the upgrade would resolve, which it didn't... Any advice very very welcome!

Thanks

C.

You're best getting in touch with your hosting about that, its something they should be able to fix
ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4879
Joined: Wed May 26, 2010 10:47 am
Location: United Kingdom

Re: Friendly URLs .htaccess help

Postby Superior1 » Fri Mar 09, 2012 6:07 pm

Thanks for your help, I tried them before with no joy but will try again....

Thanks
Superior1
 
Posts: 39
Joined: Sat Aug 27, 2011 4:39 am

Re: Friendly URLs .htaccess help

Postby bikermunda » Mon Mar 12, 2012 3:07 am

JAY6390 wrote:Without the .htaccess file, you're not going to get seo urls to work. The contents of what should be in the .htaccess file in the root directory is found here
http://opencart.googlecode.com/svn/trun ... access.txt


So i should add this in the .htaccess file ? and was i correct with the location of .htaccess file or is it supposed to be some where else ?
bikermunda
 
Posts: 56
Joined: Fri Jan 27, 2012 7:58 pm

Re: Friendly URLs .htaccess help

Postby MarketInSG » Mon Mar 12, 2012 4:01 am

Add .htaccess file where you can see config.php being at. The one where you see admin folder, catalog folder, download folder. Place it there. Enable SEO from your admin panel. That will work.

Alternatively, you can PM me a link to your website and I can take a look. I recently fixed quite a few for others :P
User avatar
MarketInSG
 
Posts: 5211
Joined: Tue Nov 15, 2011 10:53 pm
Location: Singapore

Re: Friendly URLs .htaccess help

Postby bikermunda » Mon Mar 12, 2012 12:57 pm

MarketInSG wrote:Add .htaccess file where you can see config.php being at. The one where you see admin folder, catalog folder, download folder. Place it there. Enable SEO from your admin panel. That will work.

Alternatively, you can PM me a link to your website and I can take a look. I recently fixed quite a few for others :P


Sending you a PM right now via PM
bikermunda
 
Posts: 56
Joined: Fri Jan 27, 2012 7:58 pm

Re: Friendly URLs .htaccess help

Postby ocdictor » Tue Mar 13, 2012 3:13 am

You need to confirm that your .htaccess file includes following contents:

Code: Select all
# 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
Last edited by Johnathan on Tue Mar 13, 2012 8:45 am, edited 1 time in total.
Reason: Added [code] tags for readability
What's the difference between the OpenCart Templates and Prestashop Themes?
ocdictor
 
Posts: 14
Joined: Tue Mar 13, 2012 3:01 am

Re: Friendly URLs .htaccess help

Postby MarketInSG » Tue Mar 13, 2012 7:11 am

Do a favor, post codes within codes tag.
User avatar
MarketInSG
 
Posts: 5211
Joined: Tue Nov 15, 2011 10:53 pm
Location: Singapore

Re: Friendly URLs .htaccess help

Postby ankit1589 » Mon Mar 19, 2012 1:38 pm

I installed latest OC on my local server i.e. XAMPP. I followed the instructions for using seo urls but when I click on the product which is seo optimised, it redirects me to my root i.e. http://localhost/xampp .

Please suggest me wat to do.

I have even mod_rewrite in XAMPP->apache->httpd-conf file
ankit1589
 
Posts: 9
Joined: Sun Mar 18, 2012 2:14 pm

Re: Friendly URLs .htaccess help

Postby nikokat » Sun May 20, 2012 3:18 am

Im having this same problem with version 1.5.2.1. Is there fix for this yet?
nikokat
 
Posts: 3
Joined: Mon Jan 24, 2011 5:52 pm

Re: Friendly URLs .htaccess help

Postby MarketInSG » Sun May 20, 2012 6:57 am

nikokat wrote:Im having this same problem with version 1.5.2.1. Is there fix for this yet?


Everything works for SEO url. Many websites are running on it now.
User avatar
MarketInSG
 
Posts: 5211
Joined: Tue Nov 15, 2011 10:53 pm
Location: Singapore

Re: Friendly URLs .htaccess help

Postby nashant » Wed Jun 06, 2012 7:31 am

If you haven't got it installed to root then make sure you change the rewritebase to /opencart_directory/
nashant
 
Posts: 2
Joined: Wed Jun 06, 2012 7:30 am

Re: Friendly URLs .htaccess help

Postby HankMcSpank » Sat Jul 07, 2012 9:40 am

So like many other n00bs, I'm a little overwhelmed at the steps neeeded to make my URLs SEO friendly, here's what I've done.....

http://www.sitefixit.com/scripts/openca ... encart.php

1. Renamed my .htaccess.txt to .htaccess
2. Added in this bit to .htaccess...
RewriteBase /opencart/
3. Enabled SEO friendly URL in Opencart admin
4. Added SEO keywords to all my products & categories


what's all the apache mod re-write melarkey (& how do I know whether this aspect has been covered off wrt to my website?)

EDIT: Ok, I got in touch with my hosting service & they've installed the apache mod re-write at my request.

So, having done all the above, how can I confirm that my URLS are inded SEO friendly ...what's the check here?


EDIT2: OK- sorted...and at the risk of talking to myself, I'll post here for the benefit of others who may also be struggling with this too. Once you've done the steps I did that I outlined above it should all work (though the content of the .htaccess outlined in that http://www.sitefixit.com URL I linked to might be wrong! As someone else pointed out further up the thread, here's what it should contain.... http://opencart.googlecode.com/svn/trun ... access.txt

You'll likely need to contact your hosting service provider (I did) as the appache mod re-write had to be installed for my domain.

To check all is ok (ie your URL are now SEO friendly) .....If you click on your products on your site, in the address bar of your browser you should then see whatever you typed in the SEO field on the data tab of your products page....careful they're not too long (less than 76 characters I think) or you'll get some product errors.
HankMcSpank
 
Posts: 138
Joined: Wed Apr 11, 2012 3:15 am

Re: Friendly URLs .htaccess help

Postby speedimpex » Mon Aug 06, 2012 6:49 am

Hello there. I hope someone can help. we're on version 1.4.9.5
I too am having problems with the ht access file.
I enabled SEO, renamed the htaccess.txt file to htaccess. It seemed to be working, but then when we were going through the website (not the admin module) depending on what you clicked on, it would lessen the results returning. E.g. if you click on Dogs, only the dry dog food is coming up, when there are actually other options under dogs. This kind of thing is happening all over the place.
I renamed the htaccess file back to htaccess.txt and everything was back as it should be. I realised that we still had an htaccess.txt file on our server. But when you remove that, and only have htaccess there, it errors when looking at the website.
What am I doing wrong?
Many thanks
Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 1:17 pm

Re: Friendly URLs .htaccess help

Postby Ideasco » Wed Aug 08, 2012 8:14 am

Just wanted to say that i may be having the same problem.

Here is how mine works:
Say Product A is in Category X
My SEO URL (entered in admin) for Category X is "category x"
So when I go to that Category on the site I get www.domain name.com/category x...... all fine there.
My SEO URL (entered in admin)for Product A is "Product A"
So when I go to the Category on the site and drill down to the product I get www.domain name.com/category x/Product A.... all fine there too.

Now, when I find the product via search or via related products, the URL is different, as follows....
www.domain name.com/product A (notice that the Category part of the URL is now missing).

In other words, the URL for the product depends on how you navigate to find it, so my products have arguably two URLS each, at least. I imaging this could be confusing for SEO.

Or, does it matter. any help would be appreciated.
Thanks
Ideasco
 
Posts: 7
Joined: Wed Aug 08, 2012 8:03 am

Re: Friendly URLs .htaccess help

Postby Cleo » Wed Aug 08, 2012 9:44 pm

@speedimpex

You wrote:
renamed the htaccess.txt file to htaccess.


You're suppose to rename it to: .htaccess with the dot at the beginning not at the end!

Cleo
My Store
My Blog
Web Host
Opencart v1.5.4 fr
Theme: Custom
vqmod-2.3.2
User avatar
Cleo
 
Posts: 580
Joined: Tue Mar 08, 2011 4:19 pm

Next

Return to Installation, Upgrade, & Config Support

Who is online

Users browsing this forum: arturocivit, Pyrocrafter and 31 guests

Hosted by Arvixe Web Hosting