http://blog.fcon21.biz/2007-11/index.php
(Though that might be robots [good ones or bad ones], where would the index.php
part come otherwise. Just one try per IP address.)
Serendipity delivers '404 Not Found' Status Error, but of course it redirects to the
Blog's home page.
Even though Garvin helped me earlier to add a shortcut URL like /post45/, /post95/,
I could not figure out how to rewrite those URLs properly. At this point I am pretty
sure that the PHP code will have to be adated, too.
I'd like to rewrite/redirect above URLs that they produce a '200 OK' Status and
deliver either the detailed or summary version of the monthly archive. The archive
URIs for my Blog setup are:
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Unfortunately it does not seem to be that easy. It simply loads the blog homepage without an error message. index.php doesn't accept the rewritten URL as 'archive'.
I started to look into index.php. The original request URI get's analized.
f (preg_match(PAT_ARCHIVES , $uri, $matches) || isset($serendipity['GET']['range']) && is_numeric($serendipity['GET']['range'])) {
$serendipity['view'] = 'archives';
$_args = $serendipity['uriArguments'];
/* Attempt to locate hidden variables within the URI */
foreach ($_args as $k => $v){
if ($v == PATH_ARCHIVES) {
continue;
}
if ($v{0} == 'C') { /* category */
$cat = substr($v, 1);
...
I'll have to look into include/genpage.inc.php, and include/functions_permalinks.inc.php for sure. The structure of the archive seems to be hardcoded. to /$archives_path/$year/$month/summary.html
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin!
External Redirection! That's it. That works fine, without having to touch any of the .php files.
I have altered the rule a bit:
Doing a 301 Permanent Redirect instead
Use a relativ path to have it work together with RewriteBase
Catch more 'mistyped URL' and exclude something that could be a valid URL to an
entry (they begin with the numerical %id% after %year%-%month%/ in my case.
Decided to show the index page instead of the summary (has more keywords)
I put it after the ordinary Rewrite rule for archives.