Introduction
When performing a website migration using cPanel Express Transfer, an incomplete transfer process can sometimes leave temporary redirect rules in the website’s .htaccess files. As a result, visitors may be redirected to a URL similar to:
http://server.example.com/cgi-sys/movingpage.cgi
This occurs because the migration process adds redirect entries to prevent access to dynamic content until the transfer is complete. If these entries are not removed afterward, the website will continue redirecting to the movingpage.cgi page.
This guide explains how to identify and remove these redirects to restore normal website functionality.
Prerequisites
Before proceeding, ensure the following requirements are met:
- Root access to the cPanel/WHM server.
- SSH access to the server.
- Basic familiarity with Linux command-line operations.
- The affected websites are hosted on a cPanel server.
Implementation
Cause of the Issue
The following entry may be present in the website’s .htaccess file:
RedirectMatch \.(dynamiccontent|pl|plx|perl|cgi|php|php4|php5|php6|php3|shtml)$ http://server.example.com/cgi-sys/movingpage.cgi
This rule redirects requests for dynamic content to the migration holding page.
Step 1: Remove Redirects for a Specific cPanel Account
cPanel provides a utility that automatically removes these redirect entries:
/usr/local/cpanel/scripts/xfertool --unblockdynamiccontent cpanelusername
Replace cpanelusername with the actual cPanel account username.
Step 2: Remove Redirects for All Accounts on the Server
If multiple websites are affected, run the following command to process all cPanel accounts:
cut -d ' ' -f2 /etc/trueuserdomains | while read user; do
/usr/local/cpanel/scripts/xfertool --unblockdynamiccontent $user
done
This command iterates through all cPanel users and removes any migration-related dynamic content blocks.
Step 3: Verify Website Accessibility
After running the commands:
- Clear your browser cache.
- Restart Apache if necessary.
- Access the affected website.
- Confirm that pages no longer redirect to
cgi-sys/movingpage.cgi.
Conclusion
Websites redirecting to cgi-sys/movingpage.cgi after a migration are typically caused by leftover Express Transfer redirect rules in .htaccess files. Using the xfertool --unblockdynamiccontent script removes these entries and restores normal website functionality. Once the cleanup is completed, the affected websites should load normally without redirecting to the migration holding page.