Jump to content

Recommended Posts

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.
Link to comment
https://forums.phpfreaks.com/topic/25253-using-mod_rewrite-with-xampp/
Share on other sites

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

Just uncommend [b]LoadModule mod_rewrite modules/mod_rewrite.sop[/b] in the httpd.conf. Save and restart the Apache server. Mod_rewrite should be enabled.
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.
Yes, I know all about how .htaccess works:

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

[code]
Options +FollowSymLinks
RewriteEngine On
[/code]

Which is what the tutorial at [url=http://www.tutorio.com/tutorial/enable-mod-rewrite-on-apache]http://www.tutorio.com/tutorial/enable-mod-rewrite-on-apache[/url] 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
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.
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.