Question

Change mod rewite rules

  • Posted on April 25, 2024
  • Nginx
  • socialistmiaAsked by Mia

Hello I am using a tool purchased on codecanyon I followed ht instructions in this doc using cloud panel on a droplet and it did not work.

Help Docs: 66biolinks.com/docs/#nginx

These are the errors I am getting from cloud panel

https://imgur.com/dbyZ8ej

https://imgur.com/LoVTZ0i

Any help would be greatly appreciated as the seller is being very difficult with supporting their product.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 6, 2024

Hey!

As far as I can tell you do have an extra location keyword on line 54 right before the if condition.

So this rule here is invalid:

location if (!-e $request_filename){ rewrite ^\/(.+)$ /index.php?altum=$1 last; }

You need to remove that line, and add the if statement inside your existing location / { ... } directive, eg:

    location / {
       if (!-e $request_filename){ rewrite ^\/(.+)$ /index.php?altum=$1 last; }
       # Some other rules here
    }

Hope that this helps!

If you still have any questions, feel free to share your complete Nginx server block here so I can advise you where exactly this needs to go.

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel