The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

suphp - cpanel 301 redirects question

Discussion in 'E-mail Discussions' started by uk01, Jan 1, 2010.

  1. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    hi we have upgraded our new servers to suphp, and will be transferring quite a few accounts from a vps without suphp.

    This will bring problems we know, but one of the questions being asked by our clients is "Will 301 redirects in cpanel still work"

    I'm sure these are based on htaccess so probably not, what should we do? Many clients have set up permanent 301 redirects for pages on their websites which have changed.

    advice appreciated :)
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    There should not be any issue with standard Apache directives such as what is used for a redirect; this should be unrelated to SuPHP.

    Other than access permissions and ownerships, the main concern I would have is if an existing .htaccess file contains PHP-related directives beginning with "php_" such as "php_flag" and "php_value" used to define PHP configuration directives. To be compatible with SuPHP, these custom settings would need to be converted into a php.ini format like that of the server-wide PHP configuration file (at "/usr/local/lib/php.ini").
     
  3. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    many thanks :)
    our transfer to the dedicated suphp server went well, just one or two hiccups in htaccess, roundcube webmail one of them, we just renamed the htaccess to php.ini and it worked!

    p.s. how do you get this forum to send email notifications of replies - and add posts to the control panel?
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Not a very wise move! :eek:

    The .htaccess and php.ini files use two totally different sets of commands ...

    In the .htaccess, you will want to comment out and / or remove any references to "php_flag", "php_admin" or AddType commands that set additional extensions as PHP scripts.

    If some of the "php_flag" or "php_admin" commands found along the way are actually needed, you can setup a "PHP.INI" for those items.

    (The vast majority of PHP overrides aren't actually needed though)
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    While the symptom may have disappeared, it will not work correctly to leave .htaccess-style entries in a php.ini file; they are both very different and do not use the same directives. Directives from a .htaccess file are not compatible with directives from a php.ini file and vice versa.

    I would use the system-wide php.ini file as an example for creating custom versions for users; this may be found at the following path:
    Code:
    /usr/local/lib/php.ini
    It's possible to set forum preferences via the forums user control panel while logged-in:
    cPanel Forums > User Control Panel > Edit Options
    Documentation: cPanel Forums - FAQ: User Profile Features
     
  6. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    hi many thanks for the advice, just hopping over to the roundcube forum because discovered loads of errors from the php.ini file in cpanel!

    Discovered this after finding out that we couldn't create new folders or anything
     
  7. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    p.s. your forum doesn't send emails when someone replies, so we have to remember where we posted... i actually found this again while searching for info on this
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To subscribe to a thread, click the menu Thread Tools that is directly above the first post on each page and then click Subscribe to this Thread.

    By default the preference Thread Subscription Mode is set to Do not subscribe -- if this is not desired you must modify or customize the preference via the user control panel of your forums account as described in my earlier reply: suphp - cpanel 301 redirects question - cPanel Forums
     
Loading...

Share This Page