Results 1 to 4 of 4

Thread: noob! help needed on mod rewrite

  1. #1
    Member kdoublei's Avatar
    Join Date
    Feb 2007
    Posts
    15

    Default noob! help needed on mod rewrite

    im a complete noob at owning my own server. i tried to install a htaccess and i got this message:

    '[Tue Feb 20 17:01:12 2007] [alert] [client 24.208.187.191] /home/xxxxx/public_html/.htaccess: Invalid command 'RewriteRule', perhaps mis-spelled or defined by a module not included in the server configuration'

    i know everything is spelled right because i used the exact same htaccess on a shared server and it works fine. i have a few questions about this.
    1. how can i tell if mod rewrite is active on the server?
    2. if its not active, how can i add this feature?
    3. is there a tutorial on adding features like this?

  2. #2
    Member
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    78

    Default

    Quote Originally Posted by kdoublei View Post
    im a complete noob at owning my own server. i tried to install a htaccess and i got this message:

    '[Tue Feb 20 17:01:12 2007] [alert] [client 24.208.187.191] /home/xxxxx/public_html/.htaccess: Invalid command 'RewriteRule', perhaps mis-spelled or defined by a module not included in the server configuration'

    i know everything is spelled right because i used the exact same htaccess on a shared server and it works fine. i have a few questions about this.
    1. how can i tell if mod rewrite is active on the server?
    2. if its not active, how can i add this feature?
    3. is there a tutorial on adding features like this?
    if you do not know the answer to basic stuff like that i strongly recommend you get a server management contract.Not to insult you personally or anything but to ensure your system is kept secure by somebody who knows what he / she is doing.

    1)

    PHP Code:
    <?php
    phpinfo
    (INFO_MODULES);
    if the "loaded modules" section mentions "mod_rewrite" you have it enabled

    2)in your httpd.conf file there should be lines like

    • LoadModule rewrite_module libexec/mod_rewrite.so
    • AddModule mod_rewrite.c


    if you don't have the "mod_rewrite.so" file (so shared object) then you need to recompile apache with mod_rewrite enabled ...

    Also the verry first line of your ".htaccess" should be

    Code:
    RewriteEngine On;

  3. #3
    Member kdoublei's Avatar
    Join Date
    Feb 2007
    Posts
    15

    Default

    Quote Originally Posted by cpanllover View Post
    if you do not know the answer to basic stuff like that i strongly recommend you get a server management contract.Not to insult you personally or anything but to ensure your system is kept secure by somebody who knows what he / she is doing.

    1)

    PHP Code:
    <?php
    phpinfo
    (INFO_MODULES);
    if the "loaded modules" section mentions "mod_rewrite" you have it enabled

    2)in your httpd.conf file there should be lines like

    • LoadModule rewrite_module libexec/mod_rewrite.so
    • AddModule mod_rewrite.c


    if you don't have the "mod_rewrite.so" file (so shared object) then you need to recompile apache with mod_rewrite enabled ...

    Also the verry first line of your ".htaccess" should be

    Code:
    RewriteEngine On;
    im looking at server management companies but im trying to get a site up and running to afford it. for the answer of #1 what does this mean and how do i get to it?
    PHP Code:
    <?php
    phpinfo
    (INFO_MODULES);
    #2. how do i get to the httpd.conf file?
    remember, im a complete noob whose trying to get by until i can afford someone to do it all for me

  4. #4
    Member
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    78

    Default

    #1 this is a PHP script you need to save it to somefile.php upload it to your server and then run it from your webbrowser (remove the file when you are done as it shows some sensitive system information)

    #2 the location of httpd.conf depends on how your server whas compiled But on CPanel servers it is usually "/etc/httpd/conf/" so in an ssh prompt type

    Code:
    cd /etc/httpd/conf
    pico -w httpd.conf
    be VERRY CAREFULL if youu edit this file this file is the "heart" from your server ....

Similar Threads

  1. Mod Rewrite Issue??? Please Help!
    By outtareach in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 03-31-2010, 06:10 PM
  2. Rewrite Mod
    By Mute in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-20-2006, 11:18 PM
  3. mod rewrite problem
    By asmithjr in forum cPanel & WHM Discussions
    Replies: 19
    Last Post: 06-10-2006, 04:37 AM
  4. mod rewrite
    By Getox in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 01-11-2005, 01:50 PM
  5. mod rewrite trouble
    By matzarah in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-23-2003, 06:16 PM