Redirecting when there is no album with htaccess or another way?
Visitmedia
Joined: 2014-08-15
Posts: 4 |
Posted: Wed, 2014-08-20 15:34 |
Hello everybody, a few months ago i have updated an old gallery1 to a gallery3. Because of several Problems the mappath does not seem to work and i dont know why. So here is my problem: The old Gallery 1 link is: if you try to open it you get this: where the page tells you that there was no mathing gallery for your request. It should map here: So i thought i could map this with a simple htaccess modification but this does not work. I tried several things like: RewriteRule ^gallery/album47/(.*)$ /ht_motor_modell/album47/$1 [R=301,NC,L] or: or: or even as a mod_rewrite Rule. But the htaccess does not seem to provide my request. Everytime i open up the first link i get the page which tells me, that there was no matching album and i should log in. Is there any way to get the old links working? Thanks in advance! |
|
Posts: 1857
There's obviously some issue with the way the import module created the map file--or maybe you've placed the htaccess in the wrong directory?
Anyhow, if you're placing the rule in your /gallery/ directory, try:
If you're placing the rule in your /gallery3/ directory, try:
I'm not sure what other htaccess goodness you have running. Other rules could easily conflict. Report back.
Posts: 4
Hello,
thanks for your info. It does not help at all. Here is my whole htaccess. Maybe there is something else wrong.
i also do not have a folder "g1" in my gallery 3 installation. Maybe this causes the problem?
Thanks for your help
Posts: 1857
That is in the /gallery3/ folder?
And there's a different htaccess in the root folder?
Looking back, even if it redirected, it wouldn't have done to the proper page anyway. (Oops)
Try moving the RewriteBase line up a line, and change the next line to these two:
EDIT:
That may be part of your original issue, but I've never imported/migrated a Gallery directly, so I'm not 100% sure. It DOES look like Gallery expects a g1 directory that maybe has an htaccess file with map rules?
Posts: 4
In the root there is no htaccess. I have copied the rewrite rules as you mentioned but it still does not help at all. The gallery does not redirect anything. There also is no folder "g1" in my installation. I just have application, bin, installier, lib, modules, system, themes and var. Then there is the .htaccess and an index.php
Here is my htacces as it is right now. I have corrected the domain in your two lines.
Posts: 1857
Regardless of whether the code I posted works, there are definitely more htaccess redirects somewhere.
Anyway, you could try
but I'm really shooting in the dark here (and that code overstretches a bit).
Also, check to be if the redirect isn't being applied, or if it's being applied, but resulting in a separate 404.
Posts: 4
Ok i found my problem.
Now the link works. I have updated my gallery3 version to the latest. Here i didnt install the gallery1 module. WIthout this module the redirections does not work. So now everything is fine and works again.
Thanks for your help anyway.
I have spent hours on this xD