1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > ecshop+ectouch LANP伪静态

ecshop+ectouch LANP伪静态

时间:2023-04-24 19:54:44

相关推荐

ecshop+ectouch LANP伪静态

ecshop:

找到nginx 的vhosts.conf,添加如下信息

server {

listen 80;

server_name ;

include ecshop.conf;

#charset koi8-r;

#access_log logs/host.access.log main;

root "D:/phpStudy/WWW/jxcat";

location / {

index index.html index.htm index.php l.php;

autoindex off;

}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html

#

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

# proxy_pass http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php(.*)$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

include fastcgi_params;

}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

# deny all;

#}

}

ecshop.conf:

if (!-e $request_filename)

{

rewrite ^/index.html$ /index.php last;

rewrite ^/category$ /index.php last;

rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1 last;

rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1 last;

rewrite ^/feed-type([^-]+).xml$ /feed.php?type=$1 last;

rewrite ^/feed.xml$ /feed.php last;

rewrite ^/category-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&page=$2&sort=$3&order=$4 last;

rewrite ^/category-([0-9]+)-([0-9]+)(.*).html$ /category.php?id=$1&page=$2 last;

rewrite ^/category-([0-9]+)(.*).html$ /category.php?id=$1 last;

rewrite ^/goods-([0-9]+)(.*).html$ /goods.php?id=$1 last;

rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;

rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)(.*).html$ /article_cat.php?id=$1&page=$2&keywords=$3 last;

rewrite ^/article_cat-([0-9]+)-([0-9]+)(.*).html$ /article_cat.php?id=$1&page=$2 last;

rewrite ^/article_cat-([0-9]+)(.*).html$ /article_cat.php?id=$1 last;

rewrite ^/article-([0-9]+)(.*).html$ /article.php?id=$1 last;

rewrite ^/merchants-([0-9]+)(.*).html$ /merchants.php?id=$1 last;

rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)-(([a-zA-Z])+([^-]*)).html /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5&act=$6 last;

rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(([a-zA-Z])+([^-]*))(.*).html /brand.php?id=$1&cat=$2&page=$3&act=$4 last;

rewrite ^/brand-([0-9]+)-c([0-9]+)-(([a-zA-Z])+([^-]*))(.*).html /brand.php?id=$1&cat=$2&act=$3 last;

rewrite ^/brand-([0-9]+)-(([a-zA-Z])+([^-]*))(.*).html /brand.php?id=$1&act=$2 last;

rewrite ^/tag-(.*).html /search.php?keywords=$1 last;

rewrite ^/snatch-([0-9]+).html$ /snatch.php?id=$1 last;

rewrite ^/group_buy-([0-9]+).html$ /group_buy.php?act=view&id=$1 last;

rewrite ^/auction-([0-9]+).html$ /auction.php?act=view&id=$1 last;

rewrite ^/exchange-id([0-9]+)(.*).html$ /exchange.php?id=$1&act=view last;

rewrite ^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;

rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;

rewrite ^/exchange-([0-9]+)-([0-9]+)(.*).html$ /exchange.php?cat_id=$1&page=$2 last;

rewrite ^/exchange-([0-9]+)(.*).html$ /exchange.php?cat_id=$1 last;

rewrite ^/news.html$ /news.php last;

rewrite ^/pictorial.html$ /pictorial.php last;

rewrite ^/news_flash.html$ /news_flash.php last;

rewrite ^/videos.html$ /videos.php last;

rewrite ^/exhibition.html$ /exhibition.php last;

rewrite ^/pictorial_info-([0-9]+)(.*).html$ /pictorial_info.php?id=$1 last;

rewrite ^/news_list-([0-9]+)-([0-9]+)(.*).html$ /news_list.php?cid=$1&page=$2 last;

rewrite ^/news_list-([0-9]+)(.*).html$ /news_list.php?cid=$1 last;

rewrite ^/seller_article_cat-([0-9]+)-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /seller_article_cat.php?id=$1&sid=$2&page=$3&sort=$4&order=$5 last;

rewrite ^/seller_article_cat-([0-9]+)-([0-9]+)-([0-9]+)-(.+)(.*).html$ /seller_article_cat.php?id=$1&sid=$2&page=$3&keywords=$4 last;

rewrite ^/seller_article_cat-([0-9]+)-([0-9]+)-([0-9]+)(.*).html$ /seller_article_cat.php?id=$1&sid=$2&page=$3 last;

rewrite ^/seller_article_cat-([0-9]+)-([0-9]+)(.*).html$ /seller_article_cat.php?id=$1&sid=$2 last;

rewrite ^/seller_article-([0-9]+)-([0-9]+)(.*).html$ /seller_article.php?id=$1&sid=$2 last;

rewrite ^/pictorial_info-([0-9]+)-([0-9]+)(.*).html$ /pictorial_info.php?id=$1&sid=$2 last;

}

etouch:

先去掉php.ini的cgi.fix_pathinfo=1前面的注释

进入nginx 的vhosts.conf添加信息

server {

listen 80;

server_name ;

include mecshop.conf;

#charset koi8-r;

#access_log logs/host.access.log main;

root "D:/phpStudy/WWW/jxcat/mobile";

location / {

index index.html index.htm index.php l.php;

autoindex off;

}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html

#

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

# proxy_pass http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php(.*)$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

include fastcgi_params;

}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

# deny all;

#}

}

mecshop.conf

if (!-e $request_filename)

{

rewrite ^/(.*)$ /index.php/$1;

}

然后找到ethuch/include/convention.php

修改'URL_HTML_SUFFIX' => 'html'为'URL_HTML_SUFFIX' => '.html',

修改'URL_MODEL' => 0为'URL_MODEL' => 2

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。