Welcome to Centmin Mod Community
Register Now

Nginx Nginx Rewrite Rules

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by DenSouLew, May 27, 2015.

Tags:
  1. DenSouLew

    DenSouLew New Member

    6
    1
    3
    May 27, 2015
    Ratings:
    +1
    Local Time:
    11:56 AM
    1.9.1
    MariaDB 10.0.19
    Hey everyone,

    Im trying some hours now to figure out how to modify the current htaccess so i can use it with Nginx. Its custom script so i havent found any nginx rules...

    Code:
    Options -Indexes +FollowSymLinks
    
    
    <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} -f [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]
            RewriteRule ^(ajax/|data/|js/|styles/|favicon\.ico|robots\.txt) - [NC,L]
            RewriteRule ^.*$ index.php?p=notfound [NC,L]
    </IfModule>

    Ive tried also the htaccess to nginx converter but it doesnt show me any suggestions for
    Code:
            RewriteCond %{REQUEST_FILENAME} -f [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]

    Any help would be really appreciated. Thanks again guys :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,926
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,745
    Local Time:
    11:56 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. DenSouLew

    DenSouLew New Member

    6
    1
    3
    May 27, 2015
    Ratings:
    +1
    Local Time:
    11:56 AM
    1.9.1
    MariaDB 10.0.19
    Ive tried it with no results :(

    If someone else can help the url is like that
    Code:
    domain.com/?p=forums&pid=11
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,926
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,745
    Local Time:
    11:56 AM
    Nginx 1.13.x
    MariaDB 5.5
    maybe
    Code:
    try_files $uri $uri/ /index.php?p=$uri&$args;