Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Canonical ReWrite Problems (301 Redirect) With Coppermine  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

Enterfrize

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Canonical ReWrite Problems (301 Redirect) With Coppermine
« on: April 08, 2012, 02:58:34 am »

Hello everyone,

I'm struggling with getting my URL Rewrite working with Coppermine.  Here are the specs:

Coppermine 1.5.18 (Latest)
Windows 2008 R2 IIS 7 Dedicated Server
Joomla 2.5.X

I am using URL Rewriter 2.0 (as far as I can tell).

The Canonical rewrite feature should do everything I need by default.  Everything looks ok, but Coppermine URLs get renamed strangely and become unusable.  I'm trying to get it to go from mtbs3d.com to www.mtbs3d.com automatically.

This is what happens.  The original URL:

http://www.mtbs3d.com/gallery/albums/farcry2review/normal_FarCry2_%230017.jpg

gets rewritten to:

http://www.mtbs3d.com/gallery/albums/farcry2review/normal_FarCry2_#0017.

So some important info is getting stripped.  Any way around this problem?

Regards,
Enterfrize
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Canonical ReWrite Problems (301 Redirect) With Coppermine
« Reply #1 on: April 08, 2012, 02:38:28 pm »

Your gallery seems to work as expected for me, but it seems that the rewrite rule is currently not enabled. Maybe this document will help you: http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_subdomain_www
Logged

Enterfrize

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Canonical ReWrite Problems (301 Redirect) With Coppermine
« Reply #2 on: April 08, 2012, 07:58:22 pm »

Hi Andre,

I don't think the document applies to IIS very well.  However, here is my web config file:

<configuration>
    <system.webServer>
        <security>
            <requestFiltering allowDoubleEscaping="false" />
        </security>
      <httpRedirect enabled="false" destination="http://www.mtbs3d.com$S$Q" exactDestination="false" childOnly="false" httpResponseStatus="Permanent" />
        <rewrite>
            <rules>
                <rule name="CanonicalHostNameRule1" enabled="false">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^www\.mtbs3d\.com$" negate="true" />
                    </conditions>
                    <action type="Redirect" url="http://www.mtbs3d.com/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

The reason the gallery worked for you us I haven't kept the rule active very long because I don't want to hamper the website use.

Regards,
Enterfrize
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Canonical ReWrite Problems (301 Redirect) With Coppermine
« Reply #3 on: April 09, 2012, 02:27:19 pm »

I never used IIS, so I don't know if your config file is correct. What happens when the rule is active and you visit your website without the leading "www" subdomain? In Apache you'll be redirected immediately to the defined domain. From this point the rule doesn't affect anything in Apache. Maybe somebody with IIS experience will see that thread and can give you some advise or at least share his/her experience.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.