• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Mod_Rewrite

K

kkellish

Guest
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
 
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
 
mod_rewrite is installed by default. Make sure to set 'RewriteEngine on' before your RewriteCond and RewriteRule statements.
 
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.
 
I assume that the rules should go into /var/www/vhosts/DOMAINNAME/conf ?

do i need to restart apache after changes?
 
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.
 
so, when I use a .htaccess file, the syntax is the same?
 
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
 
Back
Top