coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: ff on January 08, 2009, 09:32:24 PM

Title: Redirecting (or theme) by domain
Post by: ff on January 08, 2009, 09:32:24 PM
Maybe I'm thinking about something impossible.

My simplyfied tree:

root
|--- www.ff.fm
||--- www.ff.fm/fotoalbum (symlink to root/fotoalbum)
|
|--- www.ff.fm/hummeltje
||--- www.ff.fm/hummeltje/fotoalbum (symlink to root/fotoalbum)
|
|--- www.xarno.nl
||--- www.xarno.nl/fotoalbum (symlink to root/fotoalbum)
|
|--- fotoalbum (CPG)

www.ff.fm/hummeltje/fotoalbum has to be redirected to www.ff.fm/hummeltje/fotoalbum/index-25.html
www.xarno.nl/fotoalbum has to be redirected to www.xarno.nl/fotoalbum/index-26.html

There are links to these old galleries and I can't edit them all :)

What are my possibilities?
I was fiddling with httpd.conf and .htaccess but didn't get what I wanted.
I'm using the SEF-plugin and thought it could be something like that or would it be possible by creating PHP-rules in the main index?

Greetings Jeroen.
Title: Re: Redirecting (or theme) by domain
Post by: Stramm on January 09, 2009, 08:11:24 AM
That's not an issue this board covers... there are other sites for htaccess realted questíons.

I'd say you'd just need to define another index, eg. for www.xarno.nl/fotoalbum has to be redirected to www.xarno.nl/fotoalbum/index-26.html; place the htaccess in the fotoalbum dir

DirectoryIndex index-26.html index.php index.shtml index.html

or alternatively read more about RewriteCond, RewriteRule, redirectMatch

example:
(the following two solutions may not work as it should lead to an infinite loop (target in the same dir as the condition))
redirectMatch 301 ^/fotoalbum/(.*) http://www.xarno.nl/fotoalbum/index-26.html
but sends a 301 to the browser

Same problem
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/fotoalbum/ [NC]
RewriteRule (.*) http://www.xarno.nl/fotoalbum/index-26.html [L]
Title: Re: Redirecting (or theme) by domain
Post by: ff on January 09, 2009, 10:25:01 AM
Thanks Stramm,

I was hoping there was a MOD like theme by category or a plugin ;)

Back to the manpages it is.
Title: Re: Redirecting (or theme) by domain
Post by: Stramm on January 09, 2009, 12:52:14 PM
If I'm not totally wrong there was at least a discussion about the matter theme by album and/ or category. However I haven't followed it and therefore I even do not remember when that was and if there were code examples or even working code. And it's likely that it was for 1.3x.
Title: Re: Redirecting (or theme) by domain
Post by: ff on January 09, 2009, 01:23:21 PM
Quote from: Stramm on January 09, 2009, 12:52:14 PM
If I'm not totally wrong there was at least a discussion about the matter theme by album and/ or category. However I haven't followed it and therefore I even do not remember when that was and if there were code examples or even working code. And it's likely that it was for 1.3x.

There are 2 MODs for this :)

But I wanted more  ;D