Hi,
I have a number of blog posts tagged with "admin" if they're general admin posts about my blog. The other day I tried clicking on the "admin" tag to see what posts I had. I was somewhat surprised to be redirect to the admin page for my blog.
To see this try clicking on the "admin" tag on:
http://blog.etc.gen.nz/index.php?/archi ... -blog.html
I have a redirect for the admin page *only* to an HTTPS site, but that shouldn't be getting triggered by the tag page.
This is s9y v1.1, Tagging of Entries v2.88.
Cheers!
If you have a tag "admin" s9y goes to admin page.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: If you have a tag "admin" s9y goes to admin pa
Hi!
Best regards,
Garvin
Seems your redirect is wrong and listens to any occurence of "admin" in the URL?I have a redirect for the admin page *only* to an HTTPS site, but that shouldn't be getting triggered by the tag page.
Best regards,
Garvin
# 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/
# 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/
Re: If you have a tag "admin" s9y goes to admin pa
Gidday,
(All on one line of course)
So I'd be surprised if that is matching the tag...
I don't think so. This is my rewrite:garvinhicking wrote:Seems your redirect is wrong and listens to any occurence of "admin" in the URL?
Code: Select all
RewriteRule ^/serendipity_admin.php(.*)
https://blog.etc.gen.nz/serendipity_admin.php$1 [R=301,L]
So I'd be surprised if that is matching the tag...
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: If you have a tag "admin" s9y goes to admin pa
Hi!
Phew. I'm sorry, you'Re right. It is a custom Serendipity rewrite rule, that matches 'admin' too broadly:
/(admin|entries)(/.+)?
would also match your adminPath.
So, you could either try to rename your 'admin' Tags to 'administrative' or you could change the permalink configuration of your s9y installation to change the default 'admin' path permalink to sth like 'blogadmin'.
HTH,
Garvin
Phew. I'm sorry, you'Re right. It is a custom Serendipity rewrite rule, that matches 'admin' too broadly:
/(admin|entries)(/.+)?
would also match your adminPath.
So, you could either try to rename your 'admin' Tags to 'administrative' or you could change the permalink configuration of your s9y installation to change the default 'admin' path permalink to sth like 'blogadmin'.
HTH,
Garvin
# 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/
# 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/
Re: If you have a tag "admin" s9y goes to admin pa
Ah ha, good to know that I'm not crazy.garvinhicking wrote:Phew. I'm sorry, you'Re right. It is a custom Serendipity rewrite rule, that matches 'admin' too broadly:
A better fix is to correct pattern. I've a had a look in the code I can't find where it is defined PAT_ADMIN. If you can point in the right direction I'll see if I can fix it up.
Cheers!
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: If you have a tag "admin" s9y goes to admin pa
Hi!
However after you changed that you still need to regenerate/alter your .htaccess file.
HTH,
Garvin
It's a bit hidden in the file include/functions_permalinks.inc.php, function serendipity_permalinkPatterns(), $PAT['ADMIN'].A better fix is to correct pattern. I've a had a look in the code I can't find where it is defined PAT_ADMIN. If you can point in the right direction I'll see if I can fix it up.
However after you changed that you still need to regenerate/alter your .htaccess file.
HTH,
Garvin
# 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/
# 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/
Re: If you have a tag "admin" s9y goes to admin pa
Hi Garvin,
Looking at some of the other patterns I suspect there is a good chance there are other tags which will cause issues as well.
/me shrugs
Cheers!
Awesome. Here is a patch that won't match a tag called admin:garvinhicking wrote:It's a bit hidden in the file include/functions_permalinks.inc.php, function serendipity_permalinkPatterns(), $PAT['ADMIN'].
Code: Select all
diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php
index 85680a0..004c4fa 100755
--- a/include/functions_permalinks.inc.php
+++ b/include/functions_permalinks.inc.php
@@ -277,7 +277,7 @@ function &serendipity_permalinkPatterns($return = false) {
$PAT['DELETE'] = '@/' . $serendipity['permalinkDeletePath'].'/(.*)/(.*)/([0-9]+)@';
$PAT['ARCHIVES'] = '@/' . $serendipity['permalinkArchivesPath'].'([/A-Za-z0-9]+)\.html@';
$PAT['FEEDS'] = '@/' . $serendipity['permalinkFeedsPath'].'/@';
- $PAT['ADMIN'] = '@/(' . $serendipity['permalinkAdminPath'] . '|entries)(/.+)?@';
+ $PAT['ADMIN'] = '@/(?<!tag\/)(' . $serendipity['permalinkAdminPath'] . '|entries)(/.+)?@';
$PAT['ARCHIVE'] = '@/' . $serendipity['permalinkArchivePath'] . '/?@';
$PAT['CATEGORIES'] = '@/' . $serendipity['permalinkCategoriesPath'].'/([0-9;]+)@';
$PAT['PLUGIN'] = '@/(' . $serendipity['permalinkPluginPath'] . '|plugin)/(.*)@';
For whatever reason it isn't in my .htaccess, restarting Apache2 picked up the change.However after you changed that you still need to regenerate/alter your .htaccess file.
Looking at some of the other patterns I suspect there is a good chance there are other tags which will cause issues as well.
/me shrugs
Cheers!