How to remove index.php with typecho
typecho去掉index.php的方法:首先依次打开“设置->永久链接”;然后依次打开“网站-设置-配置文件”;接着修改nginx配置规则并保存即可。
推荐:《PHP视频教程》
Typecho去掉index.php让链接更美观
Typecho后台设置永久链接后,会在域名后加上index.php,很多人都接受不了
更改前是这样的:http://sunpma.com/index.php/archives/86/
更改后是这样的:http://sunpma.com/86.html
开始设置
打开设置 / 永久链接,改成如下图所示
这时会提醒你“重写功能检测失败,请检查你的服务器设置” 不用理会继续开启,然后保存设置
按照以上设置,文章链接会是数字,比如:/86.html
而分类页和独立页面会是缩阅名,而缩阅名可以自己设置,比如:/ss.html
注意:现在打开你的博客文章会出现404错误
然后我们需要修改nginx配置规则
如果使用的宝塔面板,就在 网站-设置-配置文件 里面修改
在规则里加入以下代码后保存
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }
以宝塔面板为例:
好了,一切都搞定了,现在打开你博客文章看看吧!
The above is the detailed content of How to remove index.php with typecho. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to build a social media website using PHP and Typecho With the rise of social media, more and more people want to have a social media website of their own. One way to build a social media website is to use PHP and Typecho, two open source tools. PHP is a scripting language widely used in web development, while Typecho is a small, easy-to-use, and secure blog system that is not only powerful but also convenient for secondary development. Below I will introduce how to use PHP and

How to use PHP and Typecho to build a website with multi-language support Introduction: With the development of globalization, building a website with multi-language support has gradually become a goal pursued by enterprises and individuals. As a popular programming language, PHP, combined with Typecho, an excellent PHP open source blog program, can easily build multi-language websites. This article will introduce how to use PHP and Typecho to build a website with multi-language support, and provide relevant code examples. 1. Install and configure Typecho first

Introduction to the discussion of PHP programming technology in Typecho: Typecho is a simple and efficient PHP blog engine, which is lightweight and easy to expand. This article mainly discusses PHP programming technology in Typecho, including commonly used PHP functions, database operations, file reading and writing, form processing, etc. And through code examples, it shows how to implement common functions in Typecho. 1. Application of PHP functions String processing String processing is one of the commonly used operations in PHP programming. in Type

How to implement the website image upload function through PHP and Typecho. In the trend of modern online social platforms, image sharing is a very popular way. The image upload function of the website is a must-have feature for many websites, allowing users to easily upload their own images and share them with others. This article will introduce how to implement the website image upload function through PHP and Typecho. Typecho is an open source PHP blog system, which is very suitable for building personal blogs and small websites. It is lightweight and easy to use

How to use PHP and Typecho to dynamically generate a website navigation bar. The navigation bar is a very important part of a website. It can help users quickly locate the required pages and provide users with a good browsing experience. When making a website, we usually use PHP to dynamically generate the navigation bar. This article will introduce how to use PHP and Typecho to dynamically generate a website navigation bar, and attach code examples for readers' reference. Before starting, make sure you have Typecho installed and have created

How to realize the anti-spam comment function of the website through PHP and Typecho. With the rapid development of the Internet, spam comments have become an important problem that troubles website operators. To solve this problem, we can use PHP and Typecho to implement the anti-spam comment function of the website, effectively filtering and preventing the occurrence of spam comments. Before we start, we need to make sure that you have Typecho installed and have a certain foundation in PHP programming. Below are the steps and code examples to implement the anti-spam feature on your website. Learn about trash

How to implement website subscription function through PHP and Typecho With the rapid development of the Internet, more and more people are beginning to subscribe to their favorite websites in order to get updated content at any time. In order to meet user needs, website administrators need to provide a convenient subscription function. In this article, we will introduce how to use PHP and Typecho to implement the subscription function of the website. Typecho is a simple and fast open source blog system written in PHP language. It provides a convenient plug-in mechanism that allows developers to

PHP and Typecho are innovative ways to implement content display websites. With the rapid development of the Internet, websites have become an important platform for people to obtain information, communicate and display themselves. In order to meet different needs, developers continue to seek innovative ways to implement content display websites. This article will introduce an innovative method to implement a content display website using PHP and Typecho, with code examples attached. Typecho is a simple and easy-to-use open source blog engine. It is developed in PHP language and supports custom themes and plug-ins.
