Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
RewriteRule help.
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / M-BiTsy / M-BiTsy Support

2022-05-11 23:17:20
Hi there I need an small hand fixing rewrite rules for nginx,

Folder structure is like

dev.domain.com/public_html << contain the site

outside of /public_html we have apps & data folder

the following htaccess i need to convert are below

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteRule ^$ public_html/ [L]
 RewriteRule (.*) public_html/$1 [L]
</IfModule>

    <IfModule mod_rewrite.c>
     Options -Multiviews
     RewriteEngine On
     RewriteBase /
     RewriteRule ^$ public_html/ [L]
     RewriteRule (.*) public_html/$1 [L]
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule  ^(.+)$ index.php?url=$1 [QSA,L]
   </IfModule>
Last edited by AllTheWay on 2022-05-11 23:20:29
2022-05-15 17:37:15
nginx.conf

server {
   listen 80;
   listen [::]:80 ipv6only=on;
   listen 443 ssl;
   listen [::]:443 ipv6only=on ssl;
   server_name         dev.domain.com;
   root /usr/local/www/dev.domain.com/public_html;
   index    index.php index.html index.htm;
   rewrite ^/([^/]*)/$ /index.php?url=$1 last;
}

Confirm /usr/local/www/dev.domain.com/ is a valid path.
2022-05-16 20:21:08
Thanks for the help. But we found out that this worked.

In public_html folder change the .htaccess file to:
<IfModule mod_rewrite.c>
 Options -Multiviews
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule  ^(.+)$ index.php?url=$1 [QSA,L]
</IfModule>


So just wanted to put it here, if any has the same problem.
2022-05-18 21:44:05
Then you are running Apache web server, not NGINX.

Appears what you needed was to convert some other rule to work for you on Apache.

I do recommend switching in near future, Apache is a slow bastard.

Regards,
2022-06-03 04:23:48
Somehow it works? The script is running NGINX, so don't know what you mean?
2022-06-04 03:49:55
This is too unclear, implying both types of web servers. I posted a solution for NGINX. Good luck.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728