History of PrettyUrls
Version 3 | Current version | |
---|---|---|
PrettyUrls use the Apache webserver's mod_rewrite module to handle URL rewriting to convert browser references such as http://www.example.com/blogs/1 to web server references such as http://www.example.com/blogs/index.php?post_id=1 So far Blogs and Users have had code added to handle the checkbox for PrettyUrls in Admin -> Features | PrettyUrls use the Apache webserver's mod_rewrite module to handle URL rewriting to convert browser references such as http://www.example.com/blogs/1 to web server references such as http://www.example.com/blogs/index.php?post_id=1 So far Blogs, Wiki, Fisheye and Users have had code added to handle the feature: Where to find itLook for PrettyUrls in Admin -> Kernel -> Features (mydomain.xx/kernel/admin/index.php?page=features) NB: If mod_rewrite is not activated, activating this feature will generally disable all the links in left and right hand columns. About mod_rewritemod_rewrite comes as part of apache by default and has to be enabled in your httpd.conf file:
goes to
this should be done for the / dir and your html dir such as /var/www/ First noteDepending on your web server configuration, the default supplied .htaccess files may not work. One thing to try is to comment out the "RewriteBase" line in the file. For example:
goes to
Second noteThere can be issues with mod_rewrite in apache when your pretty url partially matches a filename that already phisycally exists in the same directory and Option MultiViews is turned on. For example in Treasury package:
Apache searches for a file download and it partially matches download.php. Option MultiViews allows apache to reach download.php literally as download.php but also as download. It happends before RewriteRule is applied, so in fact your request goes do download.php but because of MultiViews, not mod_rewrite and therefore with no arguments. To solve this you have to turn off Option MutliViews in your apache configuration or in this directory in your .htaccess file:
Information about apache's MultiViews can be found on http://httpd.apache.org/docs/2.2/content-negotiation.html#page-header and some blog posts that explain it are on http://drupal.org/node/42987 and http://www.gerd-riesselmann.net/archives/2005/04/beware-of-apaches-multiviews. See Also: |