因为刚刚用阿里云然后用了AMH的控制面板。哎哎,因为我对服务器是一个文盲吧只能用控制面板控制了
然后出现了各种错误弄了我一晚上。感谢@奸雄 这个基佬的处理。
好吧收藏一下以便于下次使用。
第一次不会没有关系第二次会了就好了!。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
[ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteRule /robots.txt(.*) /robots.txt$1 [L] RewriteRule /rss.php(.*) /rss.php$1 [L] RewriteRule /tb.php(.*) /tb.php$1 [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /xmlrpc.php(.*) /xmlrpc.php$1 [L] RewriteRule /wlwmanifest.xml /wlwmanifest.xml [L] RewriteRule /(t|m)$ /$1/ [R] RewriteRule /(admin|content|include|t|m)/(.*) /$1/$2 [L] RewriteRule /install.php(.*) /install.php$1 [L] RewriteRule /emlog_toolkit.php(.*) /emlog_toolkit.php$1 [L] RewriteRule /up(d.d.d)to(d.d.d).php(.*) /up$1to$2.php$3 [L] RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L] |
1 |
支持.htaccess的IIS6服务器规则: |
1 2 3 4 5 |
<pre class="prettyprint lang-php linenums">RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [L] |
1 |
<span style="word-wrap:break-word;font-family:Tahoma, Helvetica, SimSun, sans-serif;font-size:14px;line-height:21px;white-space:normal;background-color:#FFFFFF;color:red;">【注】关于IIS6规则说明</span><span style="color:#444444;font-family:Tahoma, Helvetica, SimSun, sans-serif;font-size:14px;line-height:21px;white-space:normal;background-color:#FFFFFF;">:由于IIS6不支持.htaccess的一些判断规则,因此只能事先处理一些会被正常访问的目录或者文件。有些地方可能需要做修改:</span> <span style="color:#444444;font-family:Tahoma, Helvetica, SimSun, sans-serif;font-size:14px;line-height:21px;white-space:normal;background-color:#FFFFFF;">1、如果你有其他非emlog文件,因为添加如上规则而不能正常访问,要想使它们能正常访问的,则添加一条规则在第5行后面,参考第五行</span> |
1 |
<pre class="prettyprint lang-php linenums">RewriteRule /rss.php(.*) /rss.php$1 [L] |
将rss.php修改为你要访问的文件即可
如果你有其他非emlog目录,因为添加如上规则而不能正常访问,要想使它们能正常访问的,则参考第10、11行,将目录添加进来(用|隔开目录):
1 2 |
RewriteRule /(t|m|admin)$ /$1/ [R] RewriteRule /(admin|content|include|t|m)/(.*) /$1/$2 [L] |
2、如果你的博客在子目录,那么需要将所有目录都改为子目录的,比如你的博客在emlog目录下,那么规则如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteRule /emlog/rss.php(.*) /emlog/rss.php$1 [L] RewriteRule /emlog/tb.php(.*) /emlog/tb.php$1 [L] RewriteRule /emlog/favicon.ico /emlog/favicon.ico [L] RewriteRule /emlog/xmlrpc.php(.*) /emlog/xmlrpc.php$1 [L] RewriteRule /emlog/wlwmanifest.xml /emlog/wlwmanifest.xml [L] RewriteRule /emlog/(t|m)$ /emlog/$1/ [R] RewriteRule /emlog/(admin|content|include|t|m)/(.*) /emlog/$1/$2 [L] RewriteRule /emlog/install.php(.*) /emlog/install.php$1 [L] RewriteRule /emlog/emlog_toolkit.php(.*) /emlog/emlog_toolkit.php$1 [L] RewriteRule /emlog/up(d.d.d)to(d.d.d).php(.*) /emlog/up$1to$2.php$3 [L] RewriteRule ^/emlog/$ /emlog/index.php [L] RewriteRule /emlog/(.*) /emlog/index.php/$1 [L] |
nginx:(nginx主机请联系主机商更改规则,部分主机可能支持自定义规则)
1 2 3 4 5 6 7 |
location / { index index.php index.html; if (!-e $request_filename) { rewrite ^/(.+)$ /index.php last; } } |
IIS7/7.5 规则
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="emlog 4.0.1 for IIS7.5" stopProcessing="true"> <match url="." ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="/index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |
转载于奇遇
{smile:37}我也是用他这个。
@小丑:求包养阿。还有一个月到期我的哎哎
emlog玩的少哈。。
@小清新头像吧:没有怎么玩啦