Post by glolar » Fri Jun 16, 2017 1:41 pm

Hello,

Using OpenCart 2.3.0.2.

I have Use SEO Urls set to Yes in System > Settings > Server, and I have an SEO URL set on one of my products (the setting is cobra-cp2205-2300kv-motor). Note: I have no SEO URLs on any other products until I can get this issue resolved.

1. Go to www.skyreadyrc.com/store. Select Parts > Motors > Cobra.
2. Mouse over the first product on the left (Cobra CP-2205 2300kv Motor).
3. Notice the URL tooltip will show as "www.skyreadyrc.com/store/cobra-cp2205-2300kv-motor", which is the correct SEO URL.
4. However, click on the product. The URL after navigation to that product page is "www.skyreadyrc.com/store/index.php?_rou ... 00kv-motor".

I have been on Tech Support with my ISP, and they swear they have MOD_REWRITE installed correctly on the server. I have the following lines in the .htaccess file in the OpenCart install directory (/store directory) on the server (got this from an OpenCart 2.x tutorial):

# SEO URL Settings
RewriteEngine On
RewriteBase /store/

If you navigate directly to "www.skyreadyrc.com/store/cobra-cp2205-2300kv-motor" in the browser, there are no errors.

All of the server's PHP settings can be seen here: www.skyreadyrc.com/info.php

Does anyone know what is causing the "index.php?_route_=" to appear in the product URL? Shouldn't the URL be "www.skyreadyrc.com/store/cobra-cp2205-2300kv-motor"?

Does anyone know the fix for this?

Thanks in advance!

Larry Sanford
Sky Ready RC

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by imdevlper18 » Fri Jun 16, 2017 2:17 pm

HI,

The major cause of this is incorrect .htaccess file.

You can try with below .htaccess code:

Code: Select 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 [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com


User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm

Post by n2rtechnologies » Fri Jun 16, 2017 6:08 pm

Hi
Its look like you site is on store directory not on root.. your .htaccess file must be like

# 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 /store/
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

For support please contact us http://www.n2rtechnologies.com/

Download Free OpenCart Module.
OpenCart FREE Extensions

Hire Us and Get Free Support.
Hire OpenCart Developer


User avatar

Posts

Joined
Wed Aug 10, 2016 10:51 pm

Post by glolar » Fri Jun 16, 2017 10:54 pm

n2rtechnologies, Yes, the OpenCart installation is in the /store/ directory, as I mentioned in my original post. I have the exact values in my .htaccess file that you suggest, that is why I am mystified why the URL is not showing up properly in the browser's address bar after navigating to the product page.

I think the problem lies in a server setting somewhere, but my ISP disagrees.

Any other ideas are welcomed ... I am stymied.

Thank you.

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by victorj » Sat Jun 17, 2017 4:08 am

2 possebilities
either there are some errors in your config files https related or https setup, or youre using oc 2.2
that version has a huge problem when runing your site under ssl

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by glolar » Sat Jun 17, 2017 4:29 am

victorj,

Using Using OpenCart 2.3.0.2, as stated in the post. Has the problem you mention been fixed in Using OpenCart 2.3.0.2?

Thank you.

User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by victorj » Sat Jun 17, 2017 4:44 am

missed version information, 2.3.x should run perfect just out off the box, unless there is a error in your config files and the way you did set it up to run ssl.
Would not mind taking a closer look to see whats going wrong.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by TLWebdesign » Wed Jun 21, 2017 7:44 pm

I have the exact same issue. Did you fix this problem and what fixed it for you?

Kind regards,
Tom

Newbie

Posts

Joined
Fri Jan 13, 2017 6:48 am

Post by TLWebdesign » Tue Jul 04, 2017 6:16 pm

Anyone?

Newbie

Posts

Joined
Fri Jan 13, 2017 6:48 am

Post by ADD Creative » Tue Jul 04, 2017 7:43 pm

It's probably a problem with the redirects in your htaccess. Check them against the example in a fresh install or post them here.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by TLWebdesign » Fri Jul 07, 2017 7:08 pm

Hi it is the standard htaccess from the upload folder. Haven't made any changes except for renaming .htaccess.txt to .htaccess

I have renamed my admin folder but that shouldn't have an affect on it.
Running DirectAdmin Apache webserver where i have the site in a subdomain wijn.domain.com the ftp file system is domain/domain.com/public_html/wijn/
I tried changing rewritebase to /wijn or /wijn/ but nothing works. no errors visible either.

htaccess file contents (important bits):

Code: Select all

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# 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 /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Hope someone can help me out.

Newbie

Posts

Joined
Fri Jan 13, 2017 6:48 am

Post by ADD Creative » Fri Jul 07, 2017 8:39 pm

Looks OK. If you URLS are in the format of wijn.domain.com/prouctname then RewriteBase should just be /.

If you click on a link like wijn.domain.com/prouctname what do you get?

Do you have any redirects [R=301,L] in your htaccess?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by sanshay » Sat Jan 27, 2018 11:09 pm

Had the same issue before and found the problem in the settings of the seo module.

Active Member

Posts

Joined
Fri Jan 25, 2013 8:49 pm

Post by karimzi_academy » Tue Jun 15, 2021 2:06 pm

rename public_html . .htaccess.txt to .htaccess or follow this step https://karimzi.blogspot.com/2021/06/op ... rking.html


Posts

Joined
Thu Jun 03, 2021 12:41 am
Who is online

Users browsing this forum: No registered users and 54 guests