1
URLの書き換え時にnginxの設定が正常に行えません。NginxのURLの設定
私が持っている:
example.com/post.php?slug=example
私はそれになりたい:htaccessファイルについては
example.com/nyheder/slug
私はそれが仕事を得るためにのために、それは簡単です。 nginxので
RewriteRule ^/?nyheder/(.*?)/?$ /post.php?slug=$1 [L]
私はいくつかの方法を試してみました:助けることができる
location/{
try_files $uri $uri/ $uri.html $uri.php?$query_string;
}
location /post.php {
rewrite ^/?nyheder/(.*?)/?$ /post.php?slug=$1 last;
}
誰を?
、それは代わりに、ファイルをダウンロードします。
のような場所ディレクティブをお試しください。 http://139.162.165.252/nyheder/the-cyber-house-rules –