Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm trying to have htaccess work on codeigniter project but the module is not working and I don't know how to enable rewrite module. To have read the htaccess. The OS is Opensuse 12.2.

I have this directive in the default-server.conf

Alias /safememoirs/ /home/gabriele/Web/safememoirs/

<Directory "/home/gabriele/Web/safememoirs">
  Options Indexes MultiViews
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

But I don't understand

A how to enable the module B Where should I put the .htaccess directive id in the default-server.conf or in the site directory?

share|improve this question

1 Answer 1

To enable use of .htaccess files, you need to change the AllowOverride None to:

AllowOverride All

Also remember to restart Apache after making changes to the configuration (changes have no effect until you do). Usually, something like rcapache2 reload or apache2ctl graceful will do it, but if these don't work, you may need to check the documentation for your configuration.

The .htaccess file should be placed in the webroot directory (/home/gabriele/Web/safememoirs/ in your case).

Also make sure you put:

 RewriteEngine On

in the .htaccess file before any rules.

share|improve this answer

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.