I am using OC 2.3.0.2 and have been battling to get the SEO URL's to work. I have followed this useful guide, and believe the problem lies in my .htaccess file. Does anybody have a sample .htaccess that I may have a look at to try determine where I am going wrong.
Guide - courtesy of CHATGPT:-
# What are the steps in Opencart 2.3.0.2 to create useful URL's
Opencart 2.3.0.2 provides the option to enable SEO URLs for a more user-friendly and search engine optimized website. Here are the steps:
Login to Admin Panel:
Log in to your Opencart admin panel.
Navigate to System Settings:
Go to "System" in the top menu, then select "Settings."
Edit Store Settings:
Inside the "Settings" section, find and click on the "Edit" button for your store.
Enable SEO URLs:
In the "Server" tab, set "Use SEO URLs" to "Yes."
Save Changes:
Save the changes made to the store settings.
Modify .htaccess:
Ensure that your server's .htaccess file is properly configured to support SEO URLs. Opencart often provides a default .htaccess file for this purpose.
Check SEO URL Structure:
Verify the structure of your SEO URLs by visiting your storefront. URLs should now be more readable and optimized.
AND my .htaccess file:-
Options +FollowSymlinks
Options -Indexes
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
</FilesMatch>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://www.ic-express.co.za%{REQUEST_URI} [R=301,L,NE]
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 [L,QSA]
Guide - courtesy of CHATGPT:-
# What are the steps in Opencart 2.3.0.2 to create useful URL's
Opencart 2.3.0.2 provides the option to enable SEO URLs for a more user-friendly and search engine optimized website. Here are the steps:
Login to Admin Panel:
Log in to your Opencart admin panel.
Navigate to System Settings:
Go to "System" in the top menu, then select "Settings."
Edit Store Settings:
Inside the "Settings" section, find and click on the "Edit" button for your store.
Enable SEO URLs:
In the "Server" tab, set "Use SEO URLs" to "Yes."
Save Changes:
Save the changes made to the store settings.
Modify .htaccess:
Ensure that your server's .htaccess file is properly configured to support SEO URLs. Opencart often provides a default .htaccess file for this purpose.
Check SEO URL Structure:
Verify the structure of your SEO URLs by visiting your storefront. URLs should now be more readable and optimized.
AND my .htaccess file:-
Options +FollowSymlinks
Options -Indexes
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
</FilesMatch>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://www.ic-express.co.za%{REQUEST_URI} [R=301,L,NE]
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 [L,QSA]
The default .htaccess is below. You just need to rename it from .htaccess.txt to .htaccess. Your rewrite to index,php is missing the route.
https://github.com/opencart/opencart/bl ... access.txt
https://github.com/opencart/opencart/bl ... access.txt
This should help:
https://www.antropy.co.uk/blog/how-to-h ... -opencart/
If not, make sure your host has mod_rewrite enabled.
https://www.antropy.co.uk/blog/how-to-h ... -opencart/
If not, make sure your host has mod_rewrite enabled.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
NO, if the base url ist set correct, it should work.
Verify that RewriteBase / is pointing to your installation.
p.s.: and what for you need CHATGPT ? ?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
These are my SE|O URL Settings:
# 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 /wamp64/www
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]
Installation is in c:\wamp64
# 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 /wamp64/www
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]
Installation is in c:\wamp64
Guess your installation is (of course) inside the folder wamp64.
And www is your default folder for all webs (as all installations have to be copied inside this folder).
So, the final line should then be: RewriteBase /
The default folder for all webs in WAMPP will be c:\wamp\www (or any other disk like d:\ or e:\)
And you will call then your instance by http(s)://localhost
If it's a subfolder it will be http(s)://localhost/webs/shop1 > the line then would be RewriteBase /webs/shop1
Quite easy and foolproof ...
But if your installation is for example inside the folder webs, the line should be RewriteBase /webs.
Same with XAMPP, where all websites reside inside the folder htdocs > RewriteBase /
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Still battling. If SEO URL's are enabled in Admin backend, and one edits a Product to add a SEO field, should the SEO edit menu be available in the edit product dropdown menus? It is available in the Data dropdown menu, but all tutorials I have read show it as one of the main headings.
I am thinking that once you add the ability of using SEO URL's, it then adds another dropdown menu, which mine isn't doing, possibly indicating that the Enable may not be functioning?
Hope this makes sense.
I am thinking that once you add the ability of using SEO URL's, it then adds another dropdown menu, which mine isn't doing, possibly indicating that the Enable may not be functioning?
Hope this makes sense.
There are no edit product dropdown menus in OpenCart. Can you explain more details?
If you look at this tutorial,
https://www.antropy.co.uk/blog/how-to-h ... -opencart/
and scroll down, you will see the image of the product edit, which includes the SEO dropdown I mention. The tutorial doesn't mention the OC version however.
https://www.antropy.co.uk/blog/how-to-h ... -opencart/
and scroll down, you will see the image of the product edit, which includes the SEO dropdown I mention. The tutorial doesn't mention the OC version however.
I wouldn't recommend developing on localhost like this. It's better to use a server that's very similar to your live environment.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
That isn't a dropdown, it's on the SEO tab. However, you won't find a SEO tab in OpenCart 2. As the tutorial says.AdieB wrote: ↑Mon Feb 26, 2024 6:52 pmIf you look at this tutorial,
https://www.antropy.co.uk/blog/how-to-h ... -opencart/
and scroll down, you will see the image of the product edit, which includes the SEO dropdown I mention. The tutorial doesn't mention the OC version however.
You need to click on 'Data' and scroll down until you see 'SEO URL'.Note: OpenCart 1 & 2 - the SEO keyword for products and categories are under the 'Data' tab, named 'SEO Keyword'.
The version of PHP is unlikely to be an issue unless you are seeing errors in your PHP and OpenCart error logs.
Who is online
Users browsing this forum: Amazon [Bot] and 60 guests