誰かが光を当てることができますか?これが問題です。Nginxを実行するサーバー上にサイトを作成する必要があります。私はこのサーバーの経験がないので、それに鼻を突っ込んでいます。index.phpを省略したいので、
http://www.mydomain.com/index.php/welcome/index
になります
http://www.mydomain.com/welcome/index
次に、/ welcome / indexを抽出して、MVCアプリケーションで開始して操作できるようにします。私は周りを見回してきましたが、自分の構成をしている可能性が高い人々のクラブで迷子になっています。
私の質問は、htaccessファイルを介してApacheで行われるように、クライアントとしてサーバーの応答に影響を与えることができるかどうか、またはサーバーをホストしているプロバイダーを関与させる必要があるかどうかです。このためにサーバーを変更するように要求しましたが、得られるサポートはあまり役に立ちません。
nginx.confファイル内で必要なサーバー応答をシミュレートすることができました。これは私にそれができることを教えてくれます。興味のある方へ。$_SERVER['REQUEST_URI']を介してURLの値を読み取ります。
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#keepalive_timeout 0;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
}
include mime.types;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}