Jump to content

mod_rewrite rules file location ?


eekeek

Recommended Posts

I understand mod_rewrite rules can go in the .htaccess file, but where else can you put them? One of the apache2 config files?

 

My setup is a Xubuntu 9.10 apache2 server and I'm pretty sure that 'RewriteMap' does not work in .htaccess.

 

I know I have a lot to learn still, but ultimately I'm trying to achieve case insensitive urls.

Link to comment
https://forums.phpfreaks.com/topic/194044-mod_rewrite-rules-file-location/
Share on other sites

thanks thorpe! Your post pointed me in the right direction. :)

 

I found and used this tutorial to get virtual hosts up and working - http://www.kandar.info/index.php/linux/create-apache-namebase-virtualhost-on-ubuntu

 

I put some rewrite rules in the virtual host file for the appropriate domain under sites-enabled and was able to do a simple redirect.

 

However, then I tried to drop in some code that makes urls case insensitive. After saving the file and upon 'sudo /etc/init.d/apache2 reload' I received a syntax error message that 'RewriteMap not allowed here...Fail!'

 

So, I suppose the obvious question now is if 'RewriteMap' is required for case insensitive urls, where do I put this code?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.