Change format of cPanel Redirects to avoid 404 pages?

sm9

Active Member
Oct 10, 2009
35
0
56
Hi there,

When using the Redirects section of cPanel, is it possible to change the format that the redirects are created in? This is because I keep getting 404 pages for the way cPanel creates them (maybe because it's clashing with other rules that I need for my CMS?), but I know that my manual method works fine.

Here's what cPanel is giving me 404's for via the Redirects section:

Code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^test$ "http\:\/\/www\.mywebsite\.org\.uk\/about\/test\/" [R=301,L]
And here's the manual method that works fine when I enter this into a .htaccess file manually (which also displays via the Redirects section, by the way):

Code:
Redirect 301 /test http://www.mywebsite.org.uk/about/test/
My client would like the ability to add their own redirects so if they could do so via this Redirects GUI, it'd be great.

Thanks,

Stephen
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Hi there,

When using the Redirects section of cPanel, is it possible to change the format that the redirects are created in? This is because I keep getting 404 pages for the way cPanel creates them (maybe because it's clashing with other rules that I need for my CMS?), but I know that my manual method works fine.

Here's what cPanel is giving me 404's for via the Redirects section:

Code:
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^test$ "http\:\/\/www\.mywebsite\.org\.uk\/about\/test\/" [R=301,L]
And here's the manual method that works fine when I enter this into a .htaccess file manually (which also displays via the Redirects section, by the way):

Code:
Redirect 301 /test http://www.mywebsite.org.uk/about/test/
My client would like the ability to add their own redirects so if they could do so via this Redirects GUI, it'd be great.

Thanks,

Stephen
Does the mod_rewrite entry setup via cPanel work after ensuring there are no other conflicting rewrite rules?

What settings and options were used for initial setup when configuring the redirect via cPanel? I would like to try to reproduce the difficulty on a clean test system.
 

sm9

Active Member
Oct 10, 2009
35
0
56
Does the mod_rewrite entry setup via cPanel work after ensuring there are no other conflicting rewrite rules?

What settings and options were used for initial setup when configuring the redirect via cPanel? I would like to try to reproduce the difficulty on a clean test system.
Hi Don,

I'm guessing it's the existing rules I have in place that are causing the issue here:

Code:
RewriteEngine On

# Remove Index.php from URL for CMS
RewriteCond $1 !^index\.php/
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
I've since found a nice module for the CMS that allows redirects to be made via that so this is no longer an issue for me, but just posting up the above for info and interest.

Thanks,

Stephen