The .htaccess configuration gives your sitemaps and AI feeds clean, SEO-friendly URLs. Without these rules, sitemaps are still accessible via full OpenCart route URLs, but clean URLs are preferable for search console submissions and readability.
URL Mapping Reference
These are the rules the extension adds to your .htaccess:
| Clean URL | Purpose |
|---|---|
/sitemap_index.xml | Master sitemap index |
/sitemaps/{lang}/product_sitemap_{n}.xml | Paginated product sitemaps |
/sitemaps/{lang}/product_tags_sitemap_{n}.xml | Product tag sitemaps |
/sitemaps/{lang}/category_sitemap.xml | Category sitemap |
/sitemaps/{lang}/brand_sitemap.xml | Brand/manufacturer sitemap |
/sitemaps/{lang}/information_sitemap.xml | Information pages sitemap |
/sitemaps/misc_sitemap.xml | Miscellaneous / custom links |
/sitemaps/{lang}/journal3blog_sitemap.xml | Journal3 blog posts |
/ai_feed_index.json | AI feed manifest (index) |
/ai-feed/{lang}/ai_product_feed_{n}.json | Paginated AI product feed pages |
{lang} = your language code (e.g., en, fr, de){n} = page number
Managing Rules from the Admin Panel
The extension provides three tools in the Settings tab → .htaccess Rules Configuration section:
Add Code to .htaccess File Reads your current .htaccess, removes any existing HB SEO rules, then inserts the latest rules in the correct position. A backup is automatically saved as .htaccess.sitemap.BACKUP before any write.
Remove .htaccess Rules Removes only the lines added by this extension. Your other .htaccess content is untouched. Reports how many lines were removed.
Manual .htaccess Setup
If your server does not allow PHP to write to .htaccess, copy the code block displayed in the admin panel and paste it into your root .htaccess file manually.
Where to place the rules: Place them after the OpenCart system/storage protection RewriteRule lines, but before the main OpenCart catch-all rule:
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]Nginx Users
The extension generates Apache-specific rules. For Nginx, translate each RewriteRule into an equivalent location ~ regex block with a rewrite directive in your server config. Contact your hosting provider for assistance.
Troubleshooting
404 on sitemap URLs after adding rules:
- Confirm
mod_rewriteis enabled on your server - Confirm
AllowOverride Allis set for your web root in the Apache virtual host config - Check that the rules were actually written (open
.htaccessin an FTP client and look for lines containingextension/hbseo/)
500 error after adding rules: Your server may have syntax restrictions. Remove the rules using the admin panel button and add them manually after reviewing the syntax.