Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-09-14 07:20:05

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

How to add static page folder to Textpattern site

Hello there !

I have an old website which is a collection of html pages. And I would like to “append” it to one of my other website done in Textpattern.
Would it be possible to have :

  1. a textpattern website with sections, articles, the whole thing. Urls being in the form of my-webite.com/title
  2. access the pages collection with a url like my-website.com/my-archive-folder/some-page

I’ve been looking at gbp_permanent_links and rah_pathway but I understand they will pick something inside textpattern

Or do I just need to set some .htacess rules ?

Thanks for any insight :)

Offline

#2 2021-09-14 07:49:10

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: How to add static page folder to Textpattern site

Hi,

aren’t these rules already set? This

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

means for me ‘grab the file/directory’ if it exists. etc_cache uses it to bypass any txp treatment.

Offline

#3 2021-09-14 09:08:52

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: How to add static page folder to Textpattern site

Just create a folder at the root of the server and upload all your (old) html files there. Textpattern will leave it alone. You can of course add a link to those pages from within Textpattern.

The htaccess rules noted by Oleg work perfectly for that on 2 different servers.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2021-09-14 11:43:58

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

Re: How to add static page folder to Textpattern site

Yep, should work fine out of the box. You might get a whinging message in Diagnostics about ‘old placehloder’ files being in the way but you can ignore it. Can’t remember if we kept that check, or axed it in recent versions. There was discussion around 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

#5 2021-09-14 12:10:29

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: How to add static page folder to Textpattern site

Bloke wrote #331608:

Can’t remember if we kept that check, or axed it in recent versions. There was discussion around it.

github.com/textpattern/textpattern/issues/1656

Offline

#6 2021-09-14 15:44:45

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: How to add static page folder to Textpattern site

Bloke wrote #331608:

You might get a whinging message in Diagnostics about ‘old placehloder’ files being in the way but you can ignore it.

I think this only happens when a section name conflicts with an existing directory.

Offline

#7 2021-09-14 19:36:19

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

Re: How to add static page folder to Textpattern site

etc wrote #331611:

I think this only happens when a section name conflicts with an existing directory.

Ah yes of course. In which case, hurrah for Textpattern working seamlessly side by side with other systems.


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