Jump to content
Sign in to follow this  
bobbymagee

New install help with nginx rewrite

Recommended Posts

Hi,

I'm looking at moving our old opencart store to CubeCart v6.
The current new web server uses nginx, and i'm only used to using Apache previously.

Although the store has successfully installed and is working, none of the links are accessible

the store is located in a sub directory /shop eg. mystore.com/shop

If i try and goto the about-us page @ mystore.com/shop/about-us.html, I get Error 404
However, if i manually amend the URL to  mystore.com/shop/index.php?seo_path=about-us, it works great.

This is the same for any link, be it products, categories or terms and conditions etc.

So, how can i get nginx to add index.php?seo_path= and strip the .html from all requests please?

Also, are there any other recommended nginx directives I should add for correct cubecart functionality?

Share this post


Link to post
Share on other sites

Welcome bobbymagee! Glad to see you made it to the forums.

As I understand it, nginx does understand Apache-style directives in the .htaccess file. However, the web server needs to be configured to use the URL Rewrite capability. For Apache, this is via enabling the mod_rewrite module. For nginx, there will be a similar enabling config setting. For Apache, there is also a configuration setting that allows that web server to be controlled by directives found in an .htaccess file (Override). For nginx, there could be something similar.

The 404's are because the rewrite directives in the .htaccess file are not being executed.

This is assuming that CubeCart has an .htaccess file with rewrite directives in its main folder.

(Nginx is a web server I am not very familiar with.)

Edited by bsmither

Share this post


Link to post
Share on other sites

nginx has no apache htaccess that's why I was asking if you have any recommended nginx directives to use instead?

Does anyone here successfully run CubeCart on an nginx platform?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...