Forums / Cotonti / Support / mp3 category over "/mp3" folder

Eugene
#1 2012-02-17 10:02

Recently bug was fixed to make System category has priority over /system folder.

Please, advise, what is the fastest way to do the same for /mp3 folder (which interfere with "mp3" category)?

 

Trustmaster
#2 2012-02-17 13:20

I don't think it could and should be done for any arbitrary category, otherwise all requests to static folders would be processed by PHP which is not what you'd want from a lightweight system. So I'd strongly recommend avoiding same folder/category names instead. Thanks to config.php, you can even override the default ones.

May the Source be with you!
Eugene
#3 2012-02-17 17:06

there are 2 things I don't like to loose - old link to pages with mp3, and old direct links to mp3-files in /mp3 folder.

Genoa made me list.php?c=mp3 - so, I never thought I would have such problem...

I'll think what to choose...

thank you, TM

GHengeveld
#4 2012-02-17 17:17

Simplest solution is to use htaccess to figure out whether or not an actual file (from mp3 folder) is being requested, or a page in the mp3 category. Something like this:

 

RewriteRule ^mp3/(.*).mp3$ mp3/$1.mp3 [QSA,NC,NE,L]
Eugene
#5 2012-04-03 08:23

Finally decide to rename that folder (eliminate interfere with mp3 category and rewrite on). Updated page_url value in cot_pages.

solved. thanks.