can't access administration after changing category path

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
rich4647
Regular
Posts: 7
Joined: Tue Apr 22, 2008 11:47 pm

can't access administration after changing category path

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: can't access administration after changing category path

Post 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
# 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/
rich4647
Regular
Posts: 7
Joined: Tue Apr 22, 2008 11:47 pm

Post 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.
rich4647
Regular
Posts: 7
Joined: Tue Apr 22, 2008 11:47 pm

Post 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]
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Good idea, committed. :)

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/
Post Reply