Page 1 of 1

SEO links whithout FollowSymlinks

Posted: Mon Jan 06, 2025 10:28 pm
by reteok
I want to activate the SEO URLS in my opencart 3.x instalation, but it seems that my priovider is not supporting FollowSymlinks. Is there a way to use seo URLS whitout FollowSymlinks?

Re: SEO links whithout FollowSymlinks

Posted: Tue Jan 07, 2025 2:20 pm
by khnaz35
Always submit the full OC version and theme being used.
Are you using nginx or apache?
Is it shared hosting or dedicated server?

Re: SEO links whithout FollowSymlinks

Posted: Tue Jan 07, 2025 3:10 pm
by nonnedelectari
reteok wrote:
Mon Jan 06, 2025 10:28 pm
I want to activate the SEO URLS in my opencart 3.x instalation, but it seems that my priovider is not supporting FollowSymlinks. Is there a way to use seo URLS whitout FollowSymlinks?
As far as I know, no rewrite rules can be used in htaccess when that directive is not set and you cannot set that directive in htaccess if not allowed by the server configuration. If therefore you are not allowed to use rewrite rules by your provider, maybe go elsewhere.
Perhaps your provider is willing to enable the SymlinksIfOwnerMatch directive instead?

Apache errorlog quote:
Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions

Re: SEO links whithout FollowSymlinks

Posted: Tue Jan 07, 2025 7:51 pm
by paulfeakins
reteok wrote:
Mon Jan 06, 2025 10:28 pm
my priovider is not supporting FollowSymlinks
Find a new host?

Re: SEO links whithout FollowSymlinks

Posted: Fri Jan 10, 2025 2:38 pm
by D3MO
All servers support httacess rules and mod rewrite for sure
reteok wrote:
Mon Jan 06, 2025 10:28 pm
I want to activate the SEO URLS in my opencart 3.x instalation, but it seems that my priovider is not supporting FollowSymlinks. Is there a way to use seo URLS whitout FollowSymlinks?

Re: SEO links whithout FollowSymlinks

Posted: Fri Jan 10, 2025 4:36 pm
by nonnedelectari
D3MO wrote:
Fri Jan 10, 2025 2:38 pm
All servers support httacess rules and mod rewrite for sure
reteok wrote:
Mon Jan 06, 2025 10:28 pm
I want to activate the SEO URLS in my opencart 3.x instalation, but it seems that my priovider is not supporting FollowSymlinks. Is there a way to use seo URLS whitout FollowSymlinks?
FollowSymlinks is enabled by default, but it no longer if your provider disables it, and it is a security risk on shared servers.
I'm sure they will enable SymLinksIfOwnerMatch instead though or they won't have many customers.

Re: SEO links whithout FollowSymlinks

Posted: Fri Jan 10, 2025 8:20 pm
by JNeuhoff
4 days now since the OP opened this form thread, and still hasn't asked the webhost to enable it?

Re: SEO links whithout FollowSymlinks

Posted: Mon Jan 13, 2025 9:08 pm
by paulfeakins
JNeuhoff wrote:
Fri Jan 10, 2025 8:20 pm
4 days now since the OP opened this form thread, and still hasn't asked the webhost to enable it?
Perhaps they've fixed the issue but hasn't come back to tell us.

Re: SEO links whithout FollowSymlinks

Posted: Tue Jan 14, 2025 7:47 am
by sedangroup
Solution: Enabling SEO URLs Without FollowSymlinks

If your hosting provider does not support the FollowSymlinks directive (common in shared hosting environments due to security restrictions), you can still enable SEO-friendly URLs in OpenCart by using the SymLinksIfOwnerMatch directive or adjusting your .htaccess configuration. Here's how:

1. Verify Hosting Environment
Confirm with your hosting provider whether they allow:
SymLinksIfOwnerMatch (often supported as a secure alternative to FollowSymlinks).
.htaccess rules and mod_rewrite functionality.

2. Update .htaccess
If FollowSymlinks is not supported but SymLinksIfOwnerMatch is allowed, modify the .htaccess file in your OpenCart installation directory.

Updated .htaccess Example

Code: Select all

<IfModule mod_rewrite.c>
    Options +SymLinksIfOwnerMatch
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?_route_=$1 [L,QSA]
</IfModule>
3. Enable SEO URLs in OpenCart
Log in to your OpenCart Admin Panel.
Go to System → Settings → Edit Store.
Under the Server tab, set Use SEO URLs to Yes.
Save your changes.

4. Test SEO URLs
Ensure that your .htaccess changes are working by visiting a product page. The URL should be SEO-friendly (e.g., yoursite.com/product-name instead of index.php?route=product/product&product_id=1).
If the URL doesn’t work, verify that mod_rewrite is enabled on your server.

5. If .htaccess or mod_rewrite is Disabled
If your provider does not support .htaccess or mod_rewrite, you have two options:

Switch Hosting Providers:
Choose a host that supports modern configurations (e.g., FollowSymlinks or SymLinksIfOwnerMatch).
This may be the easiest long-term solution if your hosting provider is restrictive.

Use Non-SEO URLs:
Keep SEO URLs disabled and focus on optimizing other aspects of your site for SEO.

6. Communicate with Your Host
Ask your hosting provider to enable SymLinksIfOwnerMatch if it’s not already enabled. Many providers are willing to make this adjustment upon request.

Example Request to Your Host:

Dear Support,

I am attempting to enable SEO-friendly URLs in my OpenCart store but have discovered that the FollowSymlinks directive is not supported on my hosting plan. Could you please enable the SymLinksIfOwnerMatch directive as a secure alternative? This will allow me to use SEO-friendly URLs without compromising server security.