1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Mod_Rewrite

Discussion in 'Plesk for Linux - 8.x and Older' started by kkellish, Jun 26, 2006.

  1. kkellish

    kkellish Guest

    0
     
    How to I enable Mod_Rewrite on my plesk 8.0? I am trying to install a script and don't know if my mod_rewrite was on. Please help me
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Check your httpd.conf file to see if mod_rewrite is available, on a RH type distro type this at the SSH shell prompt:
    Code:
    grep 'rewrite' /etc/httpd/conf/httpd.conf
    and you should see something like:
    Code:
    LoadModule rewrite_module     modules/mod_rewrite.so
    
     
  3. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    mod_rewrite is installed by default. Make sure to set 'RewriteEngine on' before your RewriteCond and RewriteRule statements.
     
  4. chris.merrill

    chris.merrill Guest

    0
     
    I have seen a lot of discussion regarding mod_rewrite..

    I am new to linux as I have previously only hosted on windows.

    Is it posted somewhere, a simple how-to use mod_rewrite with plesk?

    I am looking for simple things like:

    Code:
    domain.com/content/name = domain.com/content.php?content=name
    pretty simple, right?

    Any help would be greatly appreciated.

    I used the above-mentioned grep command and got the posted result. That leads me to believe it is working fine.
     
  5. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
  6. chris.merrill

    chris.merrill Guest

    0
     
    I assume that the rules should go into /var/www/vhosts/DOMAINNAME/conf ?

    do i need to restart apache after changes?
     
  7. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    If you put them in conf/vhost.conf you need to reload apache (and run websrvmng if you've just created vhost.conf of course). You can also just put your mod_rewrite rules in a .htaccess file. No need to reload anything then, although supposedly by using .htaccess you sacrifice some speed as apache needs to read .htaccess for each request.
     
  8. chris.merrill

    chris.merrill Guest

    0
     
    so, when I use a .htaccess file, the syntax is the same?
     
  9. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Yes. Have you even looked for info yourself?

    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
     
  10. chris.merrill

    chris.merrill Guest

    0
     
    Thanks. This is my first time on linux/apache. I have hosted on IIS for about 5 years and finally made the switch.

    I really appreciate the information you have provided. I definitely have enough to get going.

    Thanks!!!:D
     
Loading...