nginx index. php 로 다시 설정

1354 단어 nginx
location /keywords {
                index index.php;
                try_files $uri $uri/ /keywords/index.php?q=$uri&$args;

 
 
apache:
.htaccess
 1 Options +FollowSymLinks
 2 IndexIgnore */*
 3 RewriteEngine on
 4 #RewriteCond %{REQUEST_URI} !^.*(\.htm|\.xml|\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.GIF|\.PNG|\.JPG|\.JPEG|\.DAT|\.dat|\.php)$|.*(statics).*|.*(upload).*
 5 # if a directory or a file exists, use it directly
 6 RewriteCond %{REQUEST_FILENAME} !-f
 7 RewriteCond %{REQUEST_FILENAME} !-d
 8 
 9 # otherwise forward it to index.php
10 RewriteRule . index.php

좋은 웹페이지 즐겨찾기