I've installed apache 2.2 on my system (Windows Vista) and I would like to enable mod_rewrite. I've uncommented the line in conf/httpd.conf that loads the mod_rewrite module, and in phpinfo it shows the mod_rewrite is installed, yet when I use mod_rewrite in .htaccess, I just get a 404 (Not Found) error.
Is there something more you need to do for apache 2.2? Any help would be greatly appreciatted. Thanks.
Apache 2.2 Mod_Rewrite Problem
Started by dotSilver, Jul 01 2008 03:53 PM
6 replies to this topic
#1
Posted 01 July 2008 - 03:53 PM
#2
Posted 01 July 2008 - 05:43 PM
Could you provide us with the relavent .htaccess file/example urls so we can rule them out as the problem?
#4
Posted 02 July 2008 - 12:47 PM
Here's a short outing of my .htaccess file.
I know this should work because I've used this mod_rewrite before. It also happened when I was the igniter framework which they actually give the htaccess code for you. So it's something to do with the settings for apache. I've searched on google and followed a few different tutorials/articles, but none of them have worked.
<IfModule mod_rewrite.c> RewriteEngine On rewriterule ^root.html$ /magicka/index.php?page=root rewriterule ^events.html$ /magicka/index.php?page=events rewriterule ^event-([^-]+)\.html$ /magicka/index.php?page=events&id=$1 </IfModule>
I know this should work because I've used this mod_rewrite before. It also happened when I was the igniter framework which they actually give the htaccess code for you. So it's something to do with the settings for apache. I've searched on google and followed a few different tutorials/articles, but none of them have worked.
#5
Posted 02 July 2008 - 06:03 PM
1. Before you begin this, please make sure you make a backup copy of the original file in case you make a mistake, this way you can always go back to the original configuration - always backup before you begin doing something like this.)
2. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines. In Fedora you can find it at /etc/httpd/ directory.)
3. Inside the httpd.conf file find and uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line - the # sign is for comments, by removing the # sign, you are uncommenting the line)
4. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out. (I didnt find these in Fedora, yet my mod_rewrite works great)
5. After you have made the changes and saved them, restart your httpd (apache) server for the changes to take affect. The easiest way to do this is to go to the shell command and type: /etc/init.d/httpd restart (this works for Fedora, might be different for other distributions!)
6. Done
If this does not work try to follow this: http://www.wallpaper...isp-post54.html
2. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines. In Fedora you can find it at /etc/httpd/ directory.)
3. Inside the httpd.conf file find and uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line - the # sign is for comments, by removing the # sign, you are uncommenting the line)
4. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out. (I didnt find these in Fedora, yet my mod_rewrite works great)
5. After you have made the changes and saved them, restart your httpd (apache) server for the changes to take affect. The easiest way to do this is to go to the shell command and type: /etc/init.d/httpd restart (this works for Fedora, might be different for other distributions!)
6. Done
If this does not work try to follow this: http://www.wallpaper...isp-post54.html
#6
Posted 03 July 2008 - 06:34 AM
Thanks pixel. That link worked perfectly. My config file doesn't have the ClearModuleList and the AddModule stuff.
#7
Posted 06 July 2008 - 11:26 PM
I'm glad I could be helpful. If there is anything else you need let me know. Have a great day.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
