Which Directory Service do you use for your network?
None NIS LDAP LDAP + Kerberos Samba Active Directory eDirectory other ( 741 votes ~ 14 comments )
You are not currently logged in. If you do not have a user account then please consider creating one and logging in before you post your comment. This will allow you to track replies to your comment, and take part in the site much more freely.
To add your comment, fill in all the boxes below and then preview it to make sure you're happy with the way that it looks.
This is the comment you were replying to, attached to the article Making prettier URLs with mod_rewrite:
#6 Re: Making prettier URLs with mod_rewrite Posted by Anonymous (202.7.xx.xx) on Tue 28 Jun 2005 at 03:45 After spending a few hours on trying to get this to work I finally found what the 'problem' was. (I am writing this here for reference.) I have a debian 3.1 (Sarge), with Apache 1.3.x, php4. The article mentions that the mod_rewrite module needs to be loaded in /etc/apache/httpd.conf. In my install all modules are loaded in /etc/apache/modules.conf, so check that mod_rewrite is not already loaded there. Also make sure there are no backup copies of httpd.conf are in the /apache/ directory. (I read somewhere that apache will parse ALL files in the /apache/ directory. So create a new folder /apache/backup and move all backup files to it. >>>> THE MAJOR PROBLEM <<<< Here is the solution to the major problem. It has to do with 'AllowOverride' option. You will find in the httpd.conf file the tags: {Directory /some/directory} ... {/Directory} (I am using curly brackets because the pointy ones get parsed as HTML) This allows us to set options for each specific directory. (So your httpd.conf file will have a lot of those tags for different dirrectories.) Look out for the directory that affects /var/www (the web directory)(i.e. {Directory /var/www}) Look for the option 'AllowOverride' and change it from 'None' to 'All'. This means that Apache will now parse directives that are included in the .htaccess file which is located in the /var/www directory and subdirectories. This is important since this tells Apache that you can override options by using a .htaccess file. (When the option is set to 'None', apache will ignore the .htaccess file.) ------------------------------------ This was quite frustrating to figure out because, mod_rewrite was loaded, the phpinfo page also showed that it was loaded, but whenever I used a .htaccess file nothing would work. (i.e. it was completely ignored!) It seems that the default install has AllowOverride turned OFF (i.e. set to 'None'), so you have to manually set it to 'All' in the directories you want apache to parse the .htaccess file. It is all working nicely now! (I looked everywhere on Google but no one stated the obvious, I hope this can help someone and save them a lot of time!)
Posting Format:
Inappropriate comments will be removed.
Some help on entry formatting is available
Username:
Password:
[ Advanced Login ]
Register Account