How to check if Mod_Rewrite is enabled - How to enable Mod_rewrite

Discussion in 'Web Hosting' started by stock_post, Jan 8, 2012.

  1. #1
    On my un-managed vps I am trying to see if Mod_rewrite is enabled or not?
    -- How do I check that?

    If that is not enabled how to enable it?

    Any help is appreciated..


    Thanks
     
    stock_post, Jan 8, 2012 IP
  2. dgmdan

    dgmdan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Create a .php file with this as its contents:
    <?php phpinfo(); ?>
    Code (markup):
    Then visit that in your browser. If it shows mod_rewrite in your "Loaded Modules", you're good.

    If you don't have it loaded, you may be able to get it working by running this:
    sudo a2enmod rewrite
     sudo /etc/init.d/apache2 restart
    Code (markup):
    If that doesn't work, google for directions specific to your linux distro.
     
    dgmdan, Jan 8, 2012 IP
  3. prandah

    prandah Active Member

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    yes agree with dgmdan
    you just make custom php file then put that php code :D
     
    prandah, Jan 8, 2012 IP
  4. hbgalaxy

    hbgalaxy Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    easier way, if you have cpanel installed, you can do it through WHM. You need root access and i believe its in apache settings.
     
    hbgalaxy, Jan 9, 2012 IP