2016-04-17 24 views
1


私はnginxからapache2に移動したいです。しかし、どのようにnginxの書き換えルールを "apache/htaccess書き換えルール"に "変換"するのか分かりません。nginx書き換えルールをhtaccess/apache書き換えルールに変換する

location/{ 
      try_files $uri $uri/ /index.php; 
      if ($uri ~* ^/([a-z]+)$) { 
        set $page_to_view "/index.php?p=$1"; 
        rewrite ^/([a-z]+)$ /index.php?p=$1 last; 
      } 
    } 

ありがとうございます! =)

答えて

1

これは私のためにうまくいった!この場合、私は自分自身でこのことを見るのは賢明ではありませんでした...

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]