Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2021-07-01 04:25:34

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

  1. I have upgraded my site once again to Textpattern v4.8.7
  2. I also created a separate installation on a similar subfolder of the same domain, uploaded and activated my theme and uploaded the same plugins
  1. This had no effect. I still get the error page when I am logged in
  2. The new setup works perfectly. I can see the public site when I am logged in and maintenance is set to on

So, the problem is specific to the site and not related to a server setup.

Apart from copying and pasting all the contents to the new installation, I don’t really know what else I can check to discover why I get the error page while logged in.

Any additional suggestions?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#62 2024-07-31 14:25:22

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

URGENT PROBLEM

I have to temporarily cut down bandwidth usage to my sites.

So, I turned on smd_at_work (v0.5.0) on my site japanesestreets.com (Textpattern v4.8.8).

Visitors get a neat 503 Service Unavailable error page, but visitor logs show that visitors can still access pages. Even worse, images can be accessed without any problem!

For example: https://japanesestreets.com/media/11669.jpg

So, my bandwidth is not going down…

What can I do to temporarily prevent all visitors from accessing all files?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#63 2024-07-31 14:32:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

To stop images you can just rename .htaccess-dist to .htaccess in your images folder.
I don’t know about the other URLs. Do you have examples of which ones are bypassed by the plugin?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#64 2024-07-31 14:41:53

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

Bloke wrote #337513:

To stop images you can just rename .htaccess-dist to .htaccess in your images folder.
I don’t know about the other URLs. Do you have examples of which ones are bypassed by the plugin?

Thanks for the quick response, Bloke!

Here are a few:

  1. https://japanesestreets.com/photoblog/1399/harajuku-tokyo-yaponskii-2faighter-sexy-dynamite-london-monomania
  2. https://japanesestreets.com/reports/2155/100-coolest-harajuku-looks-of-2012-straight-from-tokyo
  3. https://japanesestreets.com/photoblog/3088/alice-auaa-s-s-2015

When I access these pages, I get the error page. But the logs show that they have been accessed and that bandwidth was used.

When I turn off maintenance mode in a few weeks, do I have to do something with .htaccess in my images folder?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#65 2024-07-31 14:46:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

I get 503s for those links too so I’ve no idea how they’re being accessed.

And yes, just rename the .htaccess file back to .htaccess-dist and image access will be restored.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#66 2024-07-31 14:57:26

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

Bloke wrote #337515:

I get 503s for those links too so I’ve no idea how they’re being accessed.

And yes, just rename the .htaccess file back to .htaccess-dist and image access will be restored.

Thanks. Mystery…

There is no .htaccess-dist in my images folder. Also not in other installations, or the textpattern software that I previously downloaded. Hidden files are visible and I can see other files starting with a dot.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#67 2024-07-31 15:09:44

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

Just downloaded a new textpattern-4.8.8 package. The images folder does not contain a .htaccess-dist file. The plugins folder has one! Can I use that one?

UPDATE: Just looked at the contents of the .htaccess-dist file in the plugins folder. It does not seem appropriate for the images folder…

Last edited by Kjeld (2024-07-31 15:14:16)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#68 2024-07-31 15:13:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

Ah, my bad. You can probably copy the one from the files directory since that blocks everything.

Just uncomment the RedirectMatch 403 .* Line


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#69 2024-07-31 15:14:51

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

Bloke wrote #337518:

Ah, my bad. You can probably copy the one from the files directory since that blocks everything.

OK, I will have a look!


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#70 2024-07-31 15:23:42

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_at_work: click to put your site in maintenance mode

Just to confirm, the linked files directory only has an .htaccess file, not an .htaccess-dist file.

It features this contents:

# BEGIN Textpattern

# BEGIN Textpattern

# Block access to directories without a default document.

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# Inhibit direct file downloads (display 403 Forbidden error) if desired.

# RedirectMatch 403 .*

# END Textpattern

Is this OK to use?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#71 2024-07-31 15:35:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

Yes just copy it and uncomment the line I mentioned above and see what happens. It might work.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#72 2024-07-31 15:36:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

And when you want to restore access just rename the file or delete it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB