admin 发布的文章

域名已被赎回
xiaoma.com 属于北京小马过河国际教育,创始人马骏于2008年购买这个域名开始了创业之路。

小马过河在资本市场上其实还是比较顺利,融资金额和投后估值也是一路上涨:2013年5月,学而思曹允东1200万天使投资,占15%的股份,投后估值8000万人民币,资金于2014年1月到账;2014年5月,原老虎基金中国区总裁陈小红签署A轮500万美金融资协议,占股6.67%,投后估值8000万美金;2015年1月份又与顺为资本签了1000万美金B轮融资协议,占10%的股份。

但不幸的是2017年3月小马过河开始停止公司运营,进入破产清算。现在域名过期被拍卖,理论上小马公司还有30天左右的时间赎回此域名。
144091656254412_.pic.jpg

域名状态已恢复正常
144371656256164_.pic.jpg

原文地址:http://www.yuwang.com/index.php/archives/55/

本文以宝塔 Nginx为例

typecho去掉index.php的方法:
1、在宝塔中--点击网站(域名)--设置--伪静态,自带默认规则即可,如图
typecho伪静态规则.jpeg

    if (!-e $request_filename) {
    rewrite ^(.*)$ /index.php$1 last;
}

2.后台配置typecho伪静态
typecho程序后台,设置>永久链接,按照图片中的设置,保存即可。
typeho伪静态.jpeg

注意:

选择typecho时,还会有typecho2的选择。

如果是使用域名直接安装的博客,例如本站:http://ttjx.com 为博客首页,那么请选择typecho。

如果域名已经有其它主页,希望在二级子目录来安装博客,例如:https://ttjx.com/typecho 为博客首页,那么请选择typecho2。

Typecho后台设置永久链接后,会在域名后加上index.php,很多人都接受不了。例如如下网址:

http://xxx.com/index.php/archives/37/,但我们希望最终的形式是这样:http://xxx.com/archives/37.html。那么我们如何做到这样的效果?

1.配置服务器的rewrite规则

如果在保存上述配置的时候,typecho无法自动配置,那么你可能需要手动配置服务器的rewrite规则

Linux Apache 环境 (.htaccess):


RewriteEngine On

下面是在根目录,文件夹要修改路径

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

Linux Apache 环境(Nginx):

location / {
index index.html index.php;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php) {
rewrite (.*) $1/index.php;
}
if (!-f $request_filename) {
rewrite (.*) /index.php;
}
}
Windows IIS 伪静态 (httpd.ini):

[ISAPI_Rewrite]

3600 = 1 hour

CacheClockRate 3600
RepeatLimit 32

中文tag解决

RewriteRule /tag/(.*) /index.php?tag=$1

sitemapxml

RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]

内容页

RewriteRule /(.*).html /index.php/$1.html [L]

评论

RewriteRule /(.*)/comment /index.php/$1/comment [L]

分类页

RewriteRule /category/(.*) /index.php/category/$1 [L]

分页

RewriteRule /page/(.*) /index.php/page/$1 [L]

搜索页

RewriteRule /search/(.*) /index.php/search/$1 [L]

feed

RewriteRule /feed/(.*) /index.php/feed/$1 [L]

日期归档

RewriteRule /2(.*) /index.php/2$1 [L]

上传图片等

RewriteRule /action(.*) /index.php/action$1 [L]
Typecho的IIS伪静态规则web.config

<?xml version="1.0" encoding="UTF-8"?>

<system.webServer>
    <rewrite>
        <rules>
            <rule name="typecho" stopProcessing="true">
                <match url="^(.*)$" ignoreCase="false" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>


nginx 配置

server {

    listen          80;
    server_name     yourdomain.com;
    root            /home/yourdomain/www/;
    index           index.html index.htm index.php;

    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php$1 last;
    }

    location ~ .*\.php(\/.*)*$ {
        include fastcgi.conf;
        fastcgi_pass  127.0.0.1:9000;
    }

    access_log logs/yourdomain.log combined;
}

apache 配置

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]


2.后台配置typecho伪静态

如图,在typecho后台,开启伪静态,并选择你喜好的url形式:

typecho伪静态

具体操作,根据本人实际操作如下

我的虚拟主机是apache的,在网站根目录找到.htaccess,有的没有可能是设置了隐藏文件,显示隐藏文件就能看到了。

然后编辑.htaccess文件,加入上文中对应的apache配置代码保存。然后去typecho程序后台,设置>永久链接,按照上文中图片的设置,保存即可。

原文https://www.dpaoz.com/859