Jump to content

Archived

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

shamu200

Setting up mod_rewrite in Apache

Recommended Posts

Not sure if this is the best place to ask this, but I can't hurt so...

 

I've installed Apache on my home pc for internal development, and I just recently wanted to start up a project that would work best with mod_rewrite. I've searched these forums and the web and have found very little on setting it up with Apache.

 

I found one tutorial that was incomplete on how to set it up, to say the least. They mentioned you needed to configure it with the following settings:

 

./configure

--enable-module=rewrite

--enable-shared=rewrite

I went into my httpd.conf file to see what was set up and found that the LoadModule line for mod_rewrite was commented out, so I uncommented it and still nothing works. I'm also unsure of where in the file to place the configuration options, so I have left them out as of now.

 

All I'm trying to do is use the RewriteRule options in my root .htaccess file to clean up the URLs. Here's the code I have in it so far:

 

RewriteEngine On
RewriteRule ^/gallery/index/ /image_gallery/index.php

I'm not sure what else to say, so if you can help me I'd really appreciate it. If you need any more info, feel free to ask.

Share this post


Link to post
Share on other sites

Topic moved to our Apache forum, and what OS is your box running?

Share this post


Link to post
Share on other sites

Ah, I never knew there was an Apache forum. Things really have changed around here since my last visit (quite a while back actually). Anyways, I'm running it on Window XP Home Edition.

Share this post


Link to post
Share on other sites

This Apache forum is quite new actually. I have been trying to get this working on my XP Pro box too with no luck, as far as I am aware all I had to do was add/uncomment the line:

LoadModule rewrite_module modules/mod_rewrite.so

But still no luck, any one else have any ideas?

Share this post


Link to post
Share on other sites

×

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.