Webmaster in Japan

Life in Japan, technology and webmaster topics.

April 9, 2006

Revamping Websites

It’s very tempting to keep pursuing new ideas in search of the holy grail of internet wealth. This seems to be what most internet marketers seem to do. A bit like planting a seed and not watering it and caring for the plant until it is fully grown. Of course, you have to be able to tell when a site idea is going to work or not.
I almost fell into the same trap myself but thankfully I stuck with urgentclick.com Other sites I own tick over but I don’t have enough time to look after and develop them. Sites with high PR for example. When I look at what some webmasters are saying on forums, I realise I have some valuable sites on my hands since these people get almost no traffic and poor search engine ratings. Maybe they spend too much time on forums?

So what I’m trying to say is that if you have a good idea and your site is getting visitors, build on it. It takes time, but if each month is an improvement on the last, stick with it.

So I have been making steady improvements to my sites. With Urgentclick.com it started by finding out which pages were most visited and tidying them up. Then, I improved the site template based on my increased knowledge of php and css.

Now I’m at it again, improving my directory by replacing my simple php scripts with content management software. I’ve hacked this software to suit my requirements and fix some bugs. But it’s all about improving and tweaking what is working for me.

Here it is: http://urgentclick.com/directory/

It may look a bit freaky, but so what? I got bored with “professional-looking” sites.

Filed under: Webmaster by blogmaster No Comments »

April 5, 2006

Favicon Friends

Today I launched a new project that I had in my mind for a while now. A new way to link between sites in a fun manner using Favicons. I can imagine this becoming very popular and viral amongst the webmaster community.

urgentclick.com/favicon-friends/

Filed under: Webmaster by blogmaster No Comments »

Stop Hotlinking of Images

It used to be easy to do this via the .HTACCESS file with Apache web server hosting. The way it worked was to check the REFERER server variable which shows where the request for a file is coming from. So if it was not a page on your site or a trusted domain, then you could serve up a default image.

The code could be something like this:

Options +FollowSymlinks
# no hot-linking
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^(www\.)?yoursite\.com/ [NC]
RewriteRule (.*) img/default.gif
Some sites need the line: Options +FollowSymlinks
Others don’t.

What I found recently is that the HTTP_REFERER is not present when I browse with Firefox or IE6 so the above approach doesn’t work.

So it seems like there is no way to stop the hotlinking. But here is an alternative I settled on which works well:

Regularly change the name of your image directory. This is quick and easy to do with an FTP program and you don’t need to move any files. But, of course, you need to update the links to images in your web pages. So to make this quick and easy, you can use PHP to insert the new directory name in your links with echo _IMAGE_DIR;

Sorry I can’t enter php tags here without my blog thinking I’m entering code :P

Store the value of _IMAGE_DIR in an external file such as common.php containing:

define("_IMAGE_DIR", "images123/");

And include this file at the beginning of each web page with:

include(”common.php”);

Now it’s easy to change the path to your images regularly to stop hotlinkers wasting your bandwidth.

To display a default image in place of those that no longer exist, you can add this code to your .htaccess file:

Options +FollowSymlinks
RewriteEngine On
ErrorDocument 404 http://yoursite.com/image.gif

Here’s some links to people’s pages that know more than me about .htaccess:

http://www.vnwr.com/resources/tutorials/htaccess.html

http://altlab.com/htaccess_tutorial.html

http://www.alistapart.com/articles/hotlinking/

Filed under: Webmaster by blogmaster No Comments »

March 30, 2006

Starting a Discussion Forum

I am a frequent poster on Weblamp.net - it’s a small but friendly webmaster discussion forum.

After spending some time in dialogue with the webmaster about how to make the forum more successful, I realized that I had a talent for spotting ways to improve forums or most other websites. Also, I am full of ideas which I’m frequently posting.

So, this has led me to set up my own new discussion forum ForumFixers.com At the moment I have set up the site and started posting my own articles. In time, I hope that it will become a nice little online community of people helping each other out with forum issues.

What I may do as a spin-off from this activity is to offer to set up forums for other people for a fee.

Filed under: Webmaster by blogmaster Comments Off

March 25, 2006

Simple CMS System

Each time I build a new website I simplify the page code so it is easier to make site-wide changes later on. The most basic step is to separate the styles from the content with an external style sheet.

To control positioning, sections of the page are then wrapped in DIV tags which reference the sytle sheet data. This eliminates table code.

Then I have common code in an external php file that gets inserted on every page such as the footer and logo. This results in neat and tidy page code that is easy to change.

But, each page still has duplicate information on it i.e. the layout of the functional blocks. So if I wanted to add a new block such as another navigation bar then I would need to change every page on the site.

So, what I am planning to do from now on is to have templates that define what goes on each page. Then each page will only differ by the title, an id number and the template type it is using. The id number is to use with a database to select dynamic content relevant to that particular page such as comments.
Now it would be easy to transform the whole site by editing the templates and css file i.e. we have implemented a theme system.

So this is my idea for a simple content management system. Unlike the CMS scripts that are available, I will edit the content and theme offline and upload any changes. Here’s why I like to do it like this instead of using a CMS script:

  • I like to use a web editor for this task
  • I want to understand how everything works in the code
  • I like to hand code with neat looking code layout
  • I want my site to be optimized for search engines
  • I want a local copy of my site and all the content
  • I’m only making a simple content site

The point about SEO is an important one since most CMS scripts struggle to create page urls that look natural, containing keywords. The reason is that it is easier to use numbers to represent pages where these pages are dynamically generated. For example, there may be one page containing a script that generates all the pages of a site. So urls may look like: page.php?number=12 To make the url into a search engine friendly one, special features of the web server need to be used which may not be available to many people.

As promised, it’s now launched!

http://urgentclick.com/cms/

Filed under: Webmaster by blogmaster No Comments »

« Previous PageNext Page »