ryy705 Posted July 17, 2008 Share Posted July 17, 2008 Hello, I am a mod_rewrite noob who got stuck on the first step. How do I enable mod_rewrite? I added the line "RewriteEngine On" in the apache2.conf file but when I restart apache I get following message: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration What am I doing wrong? Many thanks in advance. Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/ Share on other sites More sharing options...
trq Posted July 17, 2008 Share Posted July 17, 2008 What OS are you using? Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/#findComment-592434 Share on other sites More sharing options...
ryy705 Posted July 19, 2008 Author Share Posted July 19, 2008 Thank you for your response. I am using kubuntu. I and I just installed mod_rewrite, placed the 'RewriteEngine On' line in apache2.conf file and restarted apache with without a problem. But .htaccess doesn't seem to be working. I placed the line 'InvalidDirective Here' in the .htaccess file. But I can still load the pages in that folder. Is this because I am running everything on local computer? I have this line in the apache2.conf file: 'AccessFileName .htaccess'. Does this mean that .htaccess is enabled? Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/#findComment-594007 Share on other sites More sharing options...
vikramjeet.singla Posted July 19, 2008 Share Posted July 19, 2008 please refer to following link: http://blog.xmodx.com/2008/06/04/install-apache-and-enable-mod_rewrite-ubuntu-linux/ Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/#findComment-594020 Share on other sites More sharing options...
ryy705 Posted July 19, 2008 Author Share Posted July 19, 2008 I followed the instructions. Then I created a .htaccess file with the following lines in it: AuthUserFile /usr/local/you/safedir/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword AuthType Basic require user wsabstract But I can go to that directory without being asked for a password. Do you need to see a copy of any of the configuration files? PS. I did not create a password file. But I don't think that matters. Thank you. Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/#findComment-594422 Share on other sites More sharing options...
ignace Posted August 6, 2008 Share Posted August 6, 2008 is it possible to enable mod_rewrite when not allowed access to httpd.conf? Link to comment https://forums.phpfreaks.com/topic/115222-ho-to-enable-mod_rewrite/#findComment-610092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.