Page 1 of 1
SEO not working on 1.5.5.1
Posted: Wed May 22, 2013 10:07 pm
by James_K
Hi
We have built our site on 1.5.5.1 all worked fine, we then moved the build on to our new Linux VS, installed the SSL and now SEO URL's do not work, if we switch them off in the admin panel we can navigate to products and catergories with no issue, switch them on and we get the:
The requested URL /shop/Power was not found on this server.
Apache/2.2.22 (Ubuntu) Server at *.*.*.* Port 80
We have checked the .htaccess file, all looks how it should.
Any sugestions and advice would be greatly appreciated, been searching online for the past two days

Re: SEO not working on 1.5.5.1
Posted: Thu May 23, 2013 1:52 am
by merry
James, I'm suggesting this only because I've done this myself - capitalization issues? /shop/Power is different than /shop/power.
Merry
Re: SEO not working on 1.5.5.1
Posted: Thu May 23, 2013 2:21 am
by James_K
Just changed a few to all lower case, but still getting the 404 error - but thanks for the tip
we have also installed the System Information module, but everything looks good - green ticks.
I am sure it is something really simple that we are missing, but we just seem to be going round in circles

Re: SEO not working on 1.5.5.1
Posted: Fri May 24, 2013 8:43 am
by cwswebdesign
James_K wrote:Just changed a few to all lower case, but still getting the 404 error - but thanks for the tip
we have also installed the System Information module, but everything looks good - green ticks.
I am sure it is something really simple that we are missing, but we just seem to be going round in circles

You're getting a 404 error and not 500? Every server is different so you may want to try putting a # before optionFollowSymLinks or removing it if it's already there. Also, the Rewrite Base line is configured properly?
DL
Re: SEO not working on 1.5.5.1
Posted: Fri May 24, 2013 5:53 pm
by James_K
Yes it is the 404 error.
SetEnv DEFAULT_PHP_VERSION 5
# 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
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# 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 /shop/
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
# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Re: SEO not working on 1.5.5.1
Posted: Fri May 24, 2013 9:29 pm
by cwswebdesign
Try a # before Options FollowSymlinks
DL
Re: SEO not working on 1.5.5.1
Posted: Sat May 25, 2013 12:58 am
by butte
Check what you can in your own setup and ask support whether there's anything you don't know about but should concerning how your certificate is worded or installed on the new server. I assume that you made ALL prerequisite changes from old to new servers, but that sort of thing can be overlooked. That turning SSL off in admin panel corrects (redeploys) proper navigation simplifies double-checking both config.php files' http, https, dir sections.
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 9:00 am
by ocdev
oc 1.5.6
After setting up SSL, and SEO urls working fine before using SSL, when I click on checkout the page is not found.
If I reset all config.php back to http links it is working fine.
Any solution to this?
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 9:40 am
by butte
Just so I understand, apparently you get normal behavior both when you shut off SSL in admin System / Settings / Store / Server, and when you instead edit both config.php files. (The certificate adds wrinkles, the shutoff adds wrinkles, I'm not sure whether the short answer is yes or no, I lean toward maybe via certificate, settings aren't making sense yet.)
I trust that in RewriteBase either its directory name actually is /shop/ or you just used /shop/ HERE and the correct name appears in .htaccess as well as both config.php files.
Two of us have suggested # to still the symlinks. That means
Options FollowSymlinks
becomes
# Options FollowSymlinks
What happened with that?
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 9:52 am
by ocdev
Thanks for response,
I just set both http and https in config.php to render https pages, all seo_url pages fail.
If i set both in config.php to render http pages, then all is good.
I ran a test on my certificate installation from this page:
http://www.digicert.com/help/
and all reports good.
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 9:59 am
by butte
I edited while you posted, so see above.
In both HTTP and HTTPS the http:// and https:// seem to be satisfying the test routine but not satisfying the website itself. By editing config.php did you mean changing in the HTTPS section each https:// to http://?
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 10:10 am
by ocdev
I have the server settings set use SSL to yes.
the redirect is just / - no subdirectory
I've played with setting these in the root config.php to both http and the seo urls work, change both to https none work
define('HTTP_SERVER', '
http://www....');
// HTTPS
define('HTTPS_SERVER', '
https://www....');
If I have it like above then all standard http pages render the seo urls correctly, but when clicking on checkout when it switches to https, the seo urls fail. The website responds fine to a direct call to the root index page
https://www
--------------
I forgot to mention that the non-seo urls work fine under https, so something is strange in the rewrite ?
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 10:28 am
by butte
Admin server does not want to be protected. For server and application otherwise, in HTTPS https:// appropriately aimed.
The simple things to check for consistency are basedir (/), http:// and https://, www. and none.
The external test is happy with it, and goes in with the same .htaccess and config.,php and index.php files at work as when you go in. However, the external test is also looking at the certificate. I just ran a known good certificate, which passes as non-www but flunks as www [take it back, maybe typo, in retry it passed], and oddly enough does not work in practice. Just for kicks, try yours through the external test with and without www to see if you can make it stumble.
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 10:38 am
by ocdev
I don't following. all admin functions were working correctly under https.
Just for kicks I reset all https back to http in /admin/config.php
I didn't help the catalog.
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 10:42 am
by ocdev
Like I mentioned above, if I turn off seo_urls in the server settings, all the links work for both http and https.
So something is amiss in the url_seo.php or something else.
Re: SEO not working on 1.5.5.1
Posted: Sat Sep 28, 2013 11:06 am
by butte
You're good on admin, then, it's safely outside SSL. (Just edited above, retry passed both; it happens to be 1.5.6.0 instead, with essentially the same behaviors.) For the time being with it off the store will work. [Edited: The ssl .php files bear a look (model/, controller/, library/, whatever).]
Re: SEO not working on 1.5.5.1
Posted: Mon Sep 30, 2013 11:22 am
by ocdev
my issue was solved by adding rewrites to the ssl section in apache.....dumb oversite.
<Directory "/var/www/root/folder">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Oh well, learned more about OC code in the process...
