Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    sm9
    sm9 is offline
    Member
    Join Date
    Oct 2009
    Posts
    31

    Default Change format of cPanel Redirects to avoid 404 pages?

    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

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by sm9 View Post
    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.

  3. #3
    sm9
    sm9 is offline
    Member
    Join Date
    Oct 2009
    Posts
    31

    Default

    Quote Originally Posted by cPanelDon View Post
    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

Similar Threads & Tags
Similar threads

  1. I've got two questions, bruteforce whm/cpanel root and global 404 pages!
    By ryanlee in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-12-2010, 05:03 AM
  2. 404 pages under a folder
    By htsnet in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-12-2009, 12:51 PM
  3. 404 pages for certain packages?
    By Parahosting in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-30-2007, 03:22 PM
  4. Permanent Redirects to PHP Pages Not Working
    By Beachdog in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-04-2007, 01:16 PM
  5. 404 Pages
    By wanderingstar89 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-12-2004, 10:11 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube