Installing WordPress on Sina SAE and Enabling Pseudo-Static URLs
Key point: Sina SAE stands for Sina App Engine, an application development and hosting platform provided free of charge by Sina. This article explains how to set up your own WordPress blog on Sina SAE and enable pseudo-static URLs.
1. Register an Account
To build your own blog with Sina SAE, you first need to register a Sina SAE account. Registration address: http://sae.sina.com.cn/. At the time, it was already possible to register by linking your Sina Weibo account.
2. Create an Application
After registering and logging in, click “My Applications” to view the list of applications you have created. Click “Create New Application” below to enter the application settings.
3. Create a Subdomain
This is where you set the access address for the application you are creating. After setting the subdomain, click “Create Application” directly, and the application will be created.
4. Install the WordPress Blog Program
After creating the application, click “Recommended Applications,” select “Install” next to “WordPress for SAE,” and enter the application selection screen. For security, you need to enter the security verification password you provided during registration.
In the first field, select the name of the application you just created; in the second field, choose “Install as a new version”; in the third field, enter an integer from 1 to 9, then click “Install to the above location” below.
The system will automatically load the selected application. After loading is complete, click “Click here to enter the initialization page” or “Click here to manage this application” to enter the blog setup.
5. Configure WordPress
This step is the usual WordPress initialization setup: enter the site title, username, and password in order, then click confirm. At this point, the blog has been created, and its address is the application address you created earlier.
6. Enable WordPress Pseudo-Static URLs
The benefits of pseudo-static URLs are familiar to everyone, but the usual methods do not apply to SAE. SAE has its own way to configure pseudo-static URLs. First, go from the “Application List” into the application you just created, then click “Code Management” under “Application Management.”
Select “Edit Code” under “Actions.” After entering the new page, you will see a Config Path in the upper left. SAE implements pseudo-static URLs through this setting. Click it, and add the following code in the editing area on the right:
handle:
- rewrite: if(!is_dir() && !is_file()) goto "index.php?%{QUERY_STRING}"
Click SAVE to save it.
Finally, set the permalink format in WordPress to:
/html/%post_id%.html
You can adjust this format according to your own preference. After changing it, visit a post and confirm that the URL is generated according to the permalink format; then refresh the page and confirm that no 404 appears. If a 404 appears, first check whether the indentation, quotation marks, and permalink rule in Config Path were saved successfully.
At this point, WordPress pseudo-static URLs have been fully configured.
Finally, here is a demo for everyone, a backup of this site: http://earnfs.sinaapp.com/.
