History of FeaturePrettyUrlsExtended
Version 3
FeaturePrettyUrlsExtended
Use of URL rewriting (mod_rewrite) to generate cleaner site URL's
This feature is an extension of PrettyUrls. It adds an extra tag into the URLs to make them unambigious. Some links generated by PrettyUrls may not function as expected. For example, a link to the user page for the user 'admin' will not display correctly when PrettyUrls is enabled.
For User and Wiki links, this feature adds a '/view' tag into the generated URLs.
Normal URL:
When PrettyUrls is enabled:
When FeaturePrettyUrlsExtended is enabled:
Enabling this feature will require manually editing the default .htaccess files.
The exact changes will depend on your web server configuration.
Example for wiki/.htaccess
Or, you can incorporate all the necessary rewrites into your main Apache configuration:
For User and Wiki links, this feature adds a '/view' tag into the generated URLs.
Normal URL:
http://www.bitweaver.org/wiki/index.php?page=LDAPCompatibility
When PrettyUrls is enabled:
http://www.bitweaver.org/wiki/LDAPCompatibility
When FeaturePrettyUrlsExtended is enabled:
http://www.bitweaver.org/wiki/view/LDAPCompatibility
Enabling this feature will require manually editing the default .htaccess files.
The exact changes will depend on your web server configuration.
Example for wiki/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /wiki/
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME}/index.php -f
RewriteRule ^(.*)$ - [L]
RewriteRule view/(.*)$ index.php?page=$1 [L]
</IfModule>
Or, you can incorporate all the necessary rewrites into your main Apache configuration:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/fisheye/image/([0-9]+)(/[0-9/]+)*/?([A-Za-z]+)*$ /fisheye/view_image.php?image_id=$1&gallery_path=$2&size=$3 [L,QSA]
RewriteRule ^/fisheye/gallery([0-9/]+)*/([0-9]+)/?$ /fisheye/view.php?gallery_id=$2&gallery_path=$1 [L,QSA]
RewriteRule ^/users/([A-Za-z0-9_]+)$ /users/index.php?home=$1 [L,QSA]
RewriteRule ^/users/view/([A-Za-z0-9_]+)$ /users/index.php?home=$1 [L,QSA]
RewriteRule ^/wiki/view/(.*)$ /wiki/index.php?page=$1 [L]
RewriteRule ^/articles/([0-9]+)$ /articles/read.php?article_id=$1 [L]
RewriteRule ^/blogs/([0-9]+)$ /blogs/view.php?blog_id=$1 [L]
RewriteRule ^/blogs/post/([0-9]+)$ /blogs/view_post.php?post_id=$1 [L]
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME}/index.php -f
RewriteRule ^/wiki/(.*)$ - [L]
RewriteRule ^/wiki/(.*)$ /wiki/index.php?page=$1 [L]
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME}/index.php -f
RewriteRule ^/pigeonholes/(.*)$ - [L]
RewriteRule ^/pigeonholes/(.*)$ /pigeonholes/index.php?content_id=$1 [L]
</IfModule>