Redirecting to a (short) URI
This technique gives a possible implementation for the CategoryBpRedirection using server-side redirections.
Pre-requesites:
- Method 0
- Use a redirection server
- Method 1
- Apache server
It helps to have URIs that are stable to start with. If you use session identifiers or similar one-time tokens in the URI for normal entry pages you have some bigger problems to deal with...
Implementations Steps:
- Method 0
Use a redirection service such as purl.org or tinyurl to assign a second, short URI to a resource whose initial URI is too long.
- Method 1
- Write a .htaccess file which redirects to the URI for a resource, providing a short URI
Code sample for method 1
RewriteEngine On # Comments start with a hash RewriteBase / #simple permanent redirect RewriteRule ^map /Hidden/Deep/in/the/site/we/have/a/sitemap [R=permanent,L] # A redirect you can change. Make sure you do - e.g. via PHP or similar RewriteRule ^today /News/dailyIndex/2005/01/13/ [R,L] # Using a variable... RewriteRule ^archive/(.*)$ /News/GeneralIndex/Popular/Archive/ [R,L]
More information on how to do configure Apache is available in the Apache documentation (but it isn't very easy to read. The quotes at the start of that page are unhelpful for learning, but accurate as a description)