Page 1 of 1
can't access administration after changing category path
Posted: Sun May 04, 2008 1:45 pm
by rich4647
I wanted to remove the categories directory of the URL for the blog
Example:
Old:
server/categories/name
New:
server/name
I changed this in the configuration -> paths area, but after I made the change, I can't access the administration page anymore. It just takes me to the blog home page.
Please Help
Re: can't access administration after changing category path
Posted: Sun May 04, 2008 9:19 pm
by garvinhicking
Hi!
Serendipity always needs a prefix for archives, categories, authors and feed links. You can rename "categories" to what you want, but you can not remove it.
If after a change you cannot access something it might be because your .htaccess file is no longer valid. I assume you are using mod_rewrite? How does your current .htaccess file in the root look like?
you should always be able to re-login by using
http://yourserver/serendipity_admin.php
Regards,
Garvin
Posted: Sun May 04, 2008 10:39 pm
by rich4647
Thanks so much for the reply,
Unfortunately, I was never given file system access to the server so I can't say what htaccess looks like. (I'm working on the access now)
No matter what I do the serendipity_admin.php always redirects to the first page of the category that I tried to display without the category prefix in the URL.
Posted: Mon May 05, 2008 12:28 pm
by rich4647
The system admin was able to workaround this by changing the values in htaccess and in the database.
update serendipity_config set value = 'categories/%name%' where name ='permalinkCategoryStructure';
<<< RewriteRule ^([0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
>>> RewriteRule ^categories/([0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
His suggestion:
If they put a rule at the top of the rewrite list, it would prevent anything else from redirecting admin requests… something like this ought to do the trick -
RewriteRule ^serendipity_admin.php serendipity_admin.php [L,QSA]
Posted: Mon May 05, 2008 5:58 pm
by judebert
Y'know, Garvin, that's not a bad idea. It seems like good sense to ensure that the admin page is available, even if someone messes up the .htaccess by changing the options.
Posted: Tue May 06, 2008 10:40 am
by garvinhicking
Hi!
Good idea, committed.
Regards,
Garvin