首页 > 编程语言 >apche重定向&端口转发&隐藏index.php.htaccess

apche重定向&端口转发&隐藏index.php.htaccess

时间:2023-02-19 10:35:47浏览次数:40  
标签:index apche member htaccess html home php id


Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
#RewriteRule . index.php
RewriteRule login/(\d+)$ login.php?id=$1
RewriteRule index/home/order/id/(\d+).html$ member/index.php?id=$1
RewriteRule index/home/pay/id/(\d+).html$ member/pay.php?id=$1
RewriteRule index/home/rmb_record/id/(\d+).html$ member/rmbjl.php?id=$1
RewriteRule index/home/login_record/id/(\d+).html$ member/log.php?id=$1
RewriteRule index/home/ktfz/id/(\d+).html$ member/ktfz.php?id=$1

nginx

location ^~ /upload/ {
root /home/www/nongline/nongline-dev/data;
}
location ^~ /img/ {
root /home/www/nongline/nongline-dev/data;
}

把一个网站代理到另一个网站

比如访问 liaosp.top 其实访问

server
{
listen 80;
listen 443;

server_name liaosp.top;
index index.html index.htm index.php;

#error_page 404 /404.html;


location / {
proxy_pass javascript:void(0);
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}


}


标签:index,apche,member,htaccess,html,home,php,id
From: https://blog.51cto.com/u_14131118/6066490

相关文章