How to load content.htm backups?

General questions about CMSimple
Post Reply
Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

How to load content.htm backups?

Post by Tata » Mon Apr 06, 2009 9:43 am

I ouwld like to make a section in the website content with links to older versions of content.htm. E.g.:

Code: Select all

<H1>Welcome</h1>
....
<H1>Archive</H1>
2006 //link to last content.htm of the year 2006 renamed and saved in /content as content_2006.htm
2007 //link to last content.htm of the year 2007 renamed and saved in /content as content_2007.htm
2008 //link to last content.htm of the year 2008 renamed and saved in /content as content_2008.htm
...
I tried this with geturl, gxgeturl, wrapper, include etc. But I either got a message that the page is inaccessible, the file access is forbidden. I also tried to have this file saved in another directory, in which case the image-paths and/or plugin-functions did of course not work (or I needed to adjust them manually) and the file was then opened as a plain HTML file without the rest of the template.
My question is: is there a way how to adjust htaccess to allow opening these files from the /content dir in the actual tempmlate?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: How to load content.htm backups?

Post by mvwd » Mon Apr 06, 2009 10:16 am

The original .htaccess looks this way:

Code: Select all

order deny,allow
deny from all
You can add an extra allow-rule 'allow from xxx' for your host. For a local test you can add the rule for your IP '127.0.0.1' or by name 'localhost'.

Code: Select all

order deny,allow
deny from all
allow from localhost
I didn't tested it online, i think you have to add your web-adress ('my-adress.sk'). I think you shouldn't add the IP online, because you might not be the only host on this server using this IP-Adress.

More about .htaccess (german): http://de.selfhtml.org/servercgi/server/htaccess.htm

mvwd.

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to load content.htm backups?

Post by Tata » Mon Apr 06, 2009 12:02 pm

Sorry, this does not work. On localhost there is no problem to access these files, while there is any htaccess ignored. Seems that the separate directory and modyfications of backups is the only way :-(. Soooooooo uncomfotible...
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

CMSimple-Styles.com
Posts: 342
Joined: Thu Jun 26, 2008 8:19 pm
Location: Germany
Contact:

Re: How to load content.htm backups?

Post by CMSimple-Styles.com » Mon Apr 06, 2009 12:49 pm

Why don't you simply delete the htaccess? Then your content folder can be accessed, but what is the problem with that?

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: How to load content.htm backups?

Post by mvwd » Mon Apr 06, 2009 12:59 pm

If you use Apache (XAMPP) locally, .htaccess will work...
This will read in the old content.htm. All the CMSimple-Scripts will be filtered out (automatically by CMSimple).

Code: Select all

#CMSimple $output.=preg_replace('".*?\<body\>(.+?)\<\/body\>.*?"s', "$1", rf('./content/content_2008.htm'));#
mvwd.

Post Reply