PDA

View Full Version : mod_rewrite rules behave strange..


kombi
05-31-2006, 06:43 PM
I used the standard RewriteCond and RewriteRules and turned "Google friendly" on in phpld. With that done, not even the index.php is displayed anmore. And rewrite.log says "rewritten /index.php to index.php". Server says "Your browser send a command the server couldn't understand".

I figure that "Google Friendly" set to "on" uses the category name instead of the category id, so all that is needed is to turn every directory that is not really a directory or a file into a parameter.

httpd.conf and virtual host are all pretty straigth forward, what might be wrong?

Thanks and cheers,
Konrad

David
05-31-2006, 07:31 PM
I'm not sure about your server configuration, but for example, there is usually not a problem. For example, using cpanel hosting it always works fine. You might try searching here for RewriteBase and see if that helps.

kombi
06-01-2006, 08:07 PM
When those three conditions and that one rule are placed in an .htaccess file apache is allowed to read from it, stuff works!

To me there was never a difference between .htaccess and httpd.conf (or included files thereof), or is there? Strange indeed..

Boby
06-01-2006, 08:16 PM
http.conf is the MAIN apache configuration file.
.htaccess is a "decentralized management of configuration" file for specific folders (+subfolders). This way you can have your systemwide configs in one place and configs for a folder in another.