Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a CentOS VPS with WHM installed.

I can't seem to configure mod_rewrite in httpd.conf. Can someone point me in the right direction?

phpinfo:

http://www.winwebsolutionz.com/blog/phpinfo.php

share|improve this question
    
Which ways did you try? –  quanta Nov 15 '11 at 10:36
    
opened root server..Service Configuration-Apache Configuration Within Apache Configuration please look for Include Editor When you click on Include Editor , you'll be given 3 different choices. Pre Main Include Pre Virtual Host Include Post Virtual Host Include –  Uma Jayakumar Nov 15 '11 at 11:19
    
In your phpinfo(): the Apache httpd daemon seems to be manually compiled and the --enable-rewrite option is not there. Maybe I'm wrong... –  Olivier Pons Nov 15 '11 at 18:16

1 Answer 1

Usually cpanel(WHM) compiles mod_rewrite by default. So you must just activate it in your '.htaccess' using:

RewriteEngine On

Also I'm not sure that you can see if mod_rewrite is activated by executing phpinfo()..

share|improve this answer
    
opened root server..Service Configuration-Apache Configuration Within Apache Configuration please look for Include Editor When you click on Include Editor , you'll be given 3 different choices. Pre Main Include Pre Virtual Host Include Post Virtual Host Include ---The include we need to use in here is Pre Virtual Host Include . Please choose your apache version within Pre Virtual Host Include dropdown menu added this code............. RewriteEngine On –  Uma Jayakumar Nov 15 '11 at 11:25
    
winwebsolutionz.com/blog ...i tried to configue custom permlinks in wordpress.so created .htaccess file with this code " # BEGIN WordPress RewriteEngine On <IfModule mod_rewrite.c> RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> –  Uma Jayakumar Nov 15 '11 at 11:28
    
If you've compiled apache, you can see if it's activated in the ./compile command line; it's the option --enable-rewrite. It seems it's manually compile and the --enable-rewrite option is not there. Maybe I'm wrong... –  Olivier Pons Nov 15 '11 at 18:15
    
If your mod_rewrite is not compiled in, you will get 'Internal server error' if you add 'RewriteEngine or RewriteRule' to your .htaccess. If you have some of the directives above, and you don't get any 500-Internal server error, then your mod_rewrite is COMPILED/ENABLED. –  gryzli Nov 15 '11 at 22:35
    
when i added 'RewriteEngine' code to .htaccess file..getting this error..."Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@winwebsolutionz.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request" –  Uma Jayakumar Nov 16 '11 at 16:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.