Jump to content


Photo

Using Mod_rewrite with xampp


  • Please log in to reply
6 replies to this topic

#1 Skatecrazy1

Skatecrazy1
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts
  • LocationSouthern California

Posted 26 October 2006 - 11:53 PM

Hey, i have xampp and I was going into the httpd.conf file and uncommenting the LoadModule line for mod_rewrite, but I've heard you have to also uncomment AddModule mod_rewrite.c and ClearModuleList.

only problem for me is that I can't find either of those lines in my httpd.conf file. 

help would be greatly appreciated.
fuck it or fight it

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 October 2006 - 05:50 PM

No you don't need to uncomment/add AddModule mod_rewrite.c or ClearModuleList

Just uncommend LoadModule mod_rewrite modules/mod_rewrite.sop in the httpd.conf. Save and restart the Apache server. Mod_rewrite should be enabled.

#3 Skatecrazy1

Skatecrazy1
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts
  • LocationSouthern California

Posted 27 October 2006 - 10:25 PM

tried that, but I get a 500 when trying to view my test .htaccess file....
fuck it or fight it

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 October 2006 - 11:00 AM

You cant view htaccess files as by default Apache denies access to files starting with .ht for security reasons. What are you trying to do?

When creating a .htaccess file you don't give it a file name. Its just .htaccess nothing else. You only edit this file and then Apache reads this file automatically when going to the directory the .htaccess file is in.

#5 Skatecrazy1

Skatecrazy1
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts
  • LocationSouthern California

Posted 28 October 2006 - 04:25 PM

Yes, I know all about how .htaccess works:

I'm trying to visit the directory the .htaccess is in when it contains this code:

Options +FollowSymLinks
RewriteEngine On

Which is what the tutorial at http://www.tutorio.c...write-on-apache said would have no errors (when i tried to view the directory) if mod_rewrite were successfully enabled.

but, when I simply try to access the directory, it gives me a 500
fuck it or fight it

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 October 2006 - 05:37 PM

Open up Apaches error log (should be in a folder called logs in the XAMPP folder), scroll to the very bottom you should find an error message for why you are getting the 500 error message.

Also make sure you have restarted Apache when you enabled mod_rewrite in the httpd.conf.

#7 Skatecrazy1

Skatecrazy1
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts
  • LocationSouthern California

Posted 28 October 2006 - 06:02 PM

hmm, well it works alright now, i can view the directory even with the .htaccess present.  I had restarted apache the last time I tried it, but it still didn't work; i restarted it a second time and it worked.  thanks.
fuck it or fight it




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users