Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-12-14, 08:00 PM   #1
ClickBuster
I'm normally not a praying man, but if you're up there, please save me Superman!
 
ClickBuster's Avatar
 
Join Date: Dec 2004
Location: Bulgaria
Posts: 476
Send a message via ICQ to ClickBuster
TIP: Save some hosting space and update quickly

Subject: TIP: Save some hosting space and update quicker.

Hello guys,

This tip of mine is applicable to doorway free sites. That will save you some valuable hosting space, you won't have to re-upload the same files over and over, plus you'll be able to update everything, except for the index.html, at once, but not for every single doorway 1 by 1.

Assuming that you post your recips on index.html page, that's something that you can't update at once OR you will have all your doorway recips overwritten.

OK, where do I start from... Files preparation - you should create your free site files in the following manner. Let's say your domain is "mydomain.com" and your main freesite dir is called "freesite". You should put all your images in an "images" dir and all your files, ecept for index.html, in a dir called "free", for example. Here's how it's gonna look (sort of):

mydomain.com/freesite/doorway01/free/main.html
mydomain.com/freesite/doorway01/free/gallery1.html
..

mydomain.com/freesite/doorway01/images/gallery1/thumbs/...
mydomain.com/freesite/doorway01/images/gallery1/fullsize/...
..


First you create a small file called .htaccess in the home directory of your free site:

mydomain.com/freesite/.htaccess

That file should have the following line in it:

AddType application/x-httpd-php .html .htm

If you already have an .htaccess file - just copy this line into it. That will allow PHP server-side scriping for files with extensions .html and .htm. That means that if you put:

PHP Code:
<?php
  
echo "site";
?>
in your index.html for example - that will output "site". The idea is to keep the .html extension, instead of using .php - I heard it's better for SE listing.

Next thing you should do is create a PHP file that will create automatically symlinks for the 2 directories (free and images). Name the file something like "symnlink.php" and place it here:

mydomain.com/freesite/symlink.php

The content of the file should be:

PHP Code:
<?php
  
if ( ! is_dir ('./images') ) {
    
symlink '../doorway01/images''images' );
  }

  if ( ! 
is_dir ('./free') ) {
    
symlink '../doorway01/free''free' );
  }
?>
I assume that you have put all your image and inner files in here:

mydomain.com/freesite/doorway01/

Now if you create more doorways:

mydomain.com/freesite/doorway02/
mydomain.com/freesite/doorway03/


you can upload only the doorway dirs (doorway02, doorway03, etc) only with the index.html file with it. To make everything work, just add that line on the top of your index.html file:

PHP Code:
<?php 
  
include_once "../symlink.php"
?>
That will make things work as if you have uploaded the images in both doorway dirs.

So, if you ever need to make some change on the main.html of your free site you just update:

mydomain.com/freesite/doorway01/free/main.html

The change will affect all your doorways at once. Same thing applies for the galleries and images and banners.

Don't forget to reconfigure the data in the symlink.php file according to the directory structure of your free site, as long as you remember this everything will work properly.

Please let me know if you have any questions.
__________________
The tendency is to push it as far as you can
-- Fear and Loathing In Las Vegas
ClickBuster is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:34 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc