建站学院

铸就企业 服务社会 成就自己

网站授权教程

发布时间:2023-04-07点击数:1502

1、上传到自己的主机,输入域名打开,会出现授权的页面,添加客服提供域名授权(免费)

 

2、登录后台,登录方式:你的域名/admin.php
账号:admin
密码:admin


3、后台-全局配置-配置参数里最下面,填写刚刚申请的授权码:


4、站点信息里改成自己当前使用的域名

域名修改

5、模板路径:有些网站文字在 template 目录下对应模板文件进行修改。(请技术指导下进行修改)

Snipaste_2023-10-30_14-49-18.jpg


6、伪静态设置:全局配置-配置参数-URL规则

伪静态

Nginx下伪静态规则

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

二级目录的伪静态

location / {
	if (!-e $request_filename){
		rewrite ^/子目录名称/(.*)$ /子目录名称/index.php?p=$1 last;
	 }
}


Apache下伪静态规则

安装包根目录下:.htaccess

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?p=$1 [QSA,PT,L]

</IfModule>


IIS下伪静态规则

1)安装rewrite组件,如果使用空间一般空间商默认已经安装;

2)在站点目录建立web.config文件,规则内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                 <rule name="reIndex" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?p={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>