Problems Using Apache mod_rewrite
|
|
Greetings all… First off, I love Bitnami. Thanks to your product, I was able to get a backup website up and running in a matter of hours. This may not seem very impressive, but trust me, up until yesterday, when I heard ‘Apache’, I thought of the Lone Ranger. Now, I’m in a truly enviable position. Our company’s website is back up and running, so my emergency backup is no longer needed. However, servers do go down, so we want to get our ‘backup’ site to look and behave precisely the same way as our regular site. Everything is perfect except for one rather troubling problem. Our regular site successfully uses Apache’s mod_rewrite function. When I change the relevant radio button (in Joomla Global Configuration) to ‘yes’, I can only access my index page. Every other page I try to access gives me a joomla/____ can not be found. Here are the steps that I have taken to fix this problem: 1. I have renamed htaccess.txt to .htaccess using Windows command line. AllowOverride All In httpd.conf, I noticed that the command to initialize mod_rewrite was commented out. I removed the # to see if that made a difference. No luck. I have been through .htaccess and, while everything was identical to the .htaccess file on the server that works, I tried removing the # in front of RewriteBase / and even tried entering Joomla after the slash. Still no luck. 3. After doing some more reading, I found a Drupal tutorial that suggested I go into confs/drupal.conf and set “AllowOverride All”. Thinking ‘what the heck have I got to lose?’, I tried doing that with Joomla and still had no luck. I should note that, after making each of these changes, I stop the process and then start it up again via Program Files -> Bitnami….. in Windows Server 2003. So, here is where I am. I have tried everything I can think of and/or find online and have had absolutely no luck. Basically, I’m at my wits end and am about to consider making some form of sacrifice to the gods of Joomla and Apache….. I have two questions: First, does anyone have another suggestion for something I could try? By the way, I’m aware that this question almost certainly belongs in the regular Joomla forum, but I thought that putting it here might help some neophyte Bitnami-ers who have run into similar problems. Thank you for your help (and for reading this rather long post) |
|
|
Hi Greg, If I am correct, to enable mod_rewrite for Joomla!, you need to:
to
That’s for enabling the rewrite of urls the easy way. Now, to debug the error, please put the contents of the file <installation_path>\apache2\logs\error.log Cheers |
|
|
Hi Antonio…. First off, thank you so much for your help. I’ll find a way to pay you back one day! Attached are the contents of the error.log. I made the changes you specified and turned on mod_rewrite in global configuration between 09:14 and 09:17. When I tested the site, the log recorded the following error @ 09:17:23: |
|
|
Hi, Can you go to : C:/Program Files/SmartSwipe Web Site/apps/joomla/htdocs/faq and see if that directory does indeed exist? |
|
|
Well, this is embarassing…. I figured out my problem and, as always, the most simple possible cause was actually THE cause. I took a look in httpd.conf and discovered that the following line was # out….. LoadModule rewrite_module modules/mod_rewrite.so Anyways, I removed the #, and now, mod_rewrite works perfectly. Antonio and Daniel – I owe you both huge amounts of gratitude. If you are interested, I would be glad to write a document (written for dummies – like me) that outlines all the steps to follow to enable mod_rewrite under the base installation of the Bitnami 1.5.6 Joomla stack. In fact, feel free to pass off any kind of documentation project to me – I think that Bitnami might become something of a hobby. |
|
|
We are glad to hear that you finally got it working :) Of course, every contribution is welcome, so feel free to contact us anytime via info <at> bitnami <dot> org Cheers |
|
|
Greetings…. I’m almost finished a document on enabling mod_rewrite with a base installation of Bitnami. If all goes well (nothing ever goes well), As it stands, I’ve got a document written that will let a user remove the index.php from URLs under a base installation of the Bitnami Joomla stack. So, with the information I have now, I can get a user’s URLs into this format: (note – Since www.mydomain.com will point to the index.html file in <installation path>apache2/htdocs, I also wrote a short little section on how to turn that file into a redirect, so that typing in www.mydomain.com will redirect a user to www.mydomain.com/joomla) For the sake of overall user-friendliness, I’m interested in taking this document one step further. The /joomla subdirectory is okay for some users, www.mydomain.com/joomla/page the URLs will be www.mydomain.com/page I’ve tried making a few changes in .htaccess to make this happen, but I’m not having any luck. This makes sense since, under So, I have two questions. 1. I assume that the ‘root directory’ would be <installation path>/apache2/htdocs. Is this correct? And, if so, could I put an .htaccess file in that directory to If you can give me some guidance on this, I will gladly test it on my installation and get this figured out. I should warn you – if I am left to my own devices, Bitnami is going to have books and books worth of documentation :-) Be peaceful and thank you very much Greg |
|
|
I played around on my own and got it figured out. I’ll fully document my solution as soon as I have a day off (and figure out what exactly I did) :-) |
|
|
Great! Thanks Greg Cheers |
