PDA

View Full Version : FAQ: mod_rewrite problems a.k.a. "I'm getting 404 page not found!"


boccio
12-13-2007, 02:10 PM
Q: My homepage and Administration home page are fine, but every time I click on any category or article I get a 404 “Page not found” error?
A: This problem is a related to the Friendly URL option in Vivvo you’re using. And the reason it is not working is the mod_rewrite (http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html) module of your Web server. The web server must support mod_rewrite in order to use Vivvo’s friendly URL feature. Your server may not have this option or it is most probably not configured properly. To resolve this, you must contact server administrator and ask for assistance in this matter.

Q: How do I know I don’t have it?
A: One way is to use our requirement checklist (http://www.vivvo.net/check.zip) script and see the results. Other is to check httpd.conf (Apache configuration file) if your host gives you access to it and check if it is enabled and active.

Q: OK, but how can I be sure that the mod_rewrite causes this 404 error?
A: There are two easy ways to check this and make sure.

Go to your website administration -> Preferences -> Layouts&Modules, and turn off 'Enable friendly URL' option and then refresh your website and check if your web pages are showing.

Alternatively, you can perform this directly in browser navigation bar, without modifying preferences. Modify the URL that’s giving 404 “page not found” error, to this:
Instead of: http://www.YourSite.com/some_category/10.html
Go to: http://www.YourSite.com/index.php?news=10

Make sure to exactly substitute the number in the example. If you see normal article page, than your server does have an issue with mod_rewrite.

Q: I checked with my server administrator and I’m sure mod_rewrite option is enabled and configured properly! Is there anything else that can cause this issue?
A: If previous test worked, you definitely do have an issue. Mod_rewrite may be present in the system, but your Apache’s virtual host settings may be causing the conflict.

First, check if the htaccess file is properly uploaded to your root folder. Some FTP clients do not see the htaccess file and skip to upload it (make sure to have the option in your FTP client to show hidden files enabled).
Also, the htaccess file may not be fully executable on your server for some reason or your server may not allow custom htaccess. Some servers don't recognize the first line in the htaccess file: 'Options All -Indexes'. In that case you should delete it.

Q: My server definitely doesn't support mod_rewrite, is there any other option to enable friendly URLs without it?
A: In that case you will not be able to use the friendly URL option on that server.
To turn this option off (your site will be fully functional but only without the friendly URLs) go to your Administration -> Preferences -> Layout&Modules and set "Enable friendly URL" option to No.

northlandadv
12-13-2007, 02:42 PM
Also, if you unzip the vivvo files on a Mac, the htaccess file will NOT show up at all. This is what I missed so it never got uploaded!

karabaja
12-27-2007, 06:18 PM
mod_rewrite module on my server is ON, but firendly urls aren't working. I got 404 not found.

What could be wrong? Do I need modify htaccess?

casca
07-29-2008, 02:26 PM
I had this problem setting up the trial myself. Mod_rewrite passed the test but I had not set it up right.

If you don't set up the virtual host file correctly it still won't work. You have to setup the AllowOverride parts to ALL, if you skip that step or don't know about it you will have this problem.

so for instance: in your /etc/apache2/sites-enabled directory there is a file with your website's name. Inside that file you must change all the "AllowOverride No/whatever it is" to "AllowOverride All" There should be 2 or 3 spots you have to do it.