禁用 .htaccess 文件
The .htaccess file is a control file for Web Hosting (cPanel) and Managed WordPress hosting accounts. It's often used by applications, like WordPress, to help manage and control the site. This file can become corrupted or cause bad redirects and might need to be disabled as part of your troubleshooting.
Warning: Always make a backup of your site before troubleshooting or making any changes.
- Connect to your hosting account with FTP.
- Once connected, go to the root directory for your WordPress site, which is the folder containing your site.
- Locate the .htaccess file and rename it to .htaccess.disabled. Renaming the .htaccess prevents it from affecting your site.
Related steps
- If the file is not corrupted, you can rename the file back to .htaccess to enable it again.
- If the .htaccess file caused an error on your site and needs to remain disabled, you can automatically create a new one by resetting your permalinks.