Jump to content


Photo

Setting up mod_rewrite in Apache


  • Please log in to reply
3 replies to this topic

#1 shamu200

shamu200
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 September 2005 - 06:29 AM

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.

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 21 September 2005 - 09:26 AM

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

#3 shamu200

shamu200
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 September 2005 - 10:17 PM

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.

#4 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 23 September 2005 - 12:00 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users