qkqpttgf / OneManager-php

An index & manager of Onedrive based on serverless. Can be deployed to Heroku/Glitch/Vercel/Replit/SCF/FG/FC/CFC/PHP web hosting/VPS.
3.74k stars 2.71k forks source link

Rewrite Engine Error #711

Closed iamnadith closed 8 months ago

iamnadith commented 9 months ago

image

As you can see in this picture it's shows like this. What should I do?

laiaqwq commented 9 months ago

You missed step 2 Make the rewrite works, the rule is in .htaccess file, make sure any query redirect to index.php. See https://github.com/qkqpttgf/OneManager-php/issues/53#issuecomment-624397288

iamnadith commented 9 months ago

This is my .htaccess file. Can you help me to fix this.

Apache

LoadModule rewrite_module modules/mod_rewrite.so

AllowOverride All

RewriteEngine On

RewriteCond $1 !^(.well-known)

RewriteRule ^(.*) index.php?/$1 [L]

-----------------------------------

nginx

rewrite ^/(?!.well-known)(.*)$ /index.php?/$1 last;

#

nginx Subdirectory 在子目录中使用

location /OneManager2/ {

rewrite ^/(.*)$ /OneManager2/index.php?/$1 last;

}

#

caddy

rewrite {

to index.php?/$1

}

#

caddy2 Caddyfile

@try_files {

not path /.well-known/*

file {

try_files index.php

}

}

rewrite @try_files {http.matchers.file.relative}

#

-----------------------------------

laiaqwq commented 9 months ago

If your web server is not Apache, you should manually change the configuration file of your web server. The configuration methods of different web servers are different. you should copy the content corresponding with your web server and add it to the configuration file (like nginx.conf in nginx or Caddyfile in Caddy ... )of your web server.