Monthly ArchiveMarch 2005



Website Building 30 Mar 2005 10:13 pm

PHP Scripts Don’t Have to End in .PHP

From: Robert Plank

If you tweak your site to perform better in search rankings then you practice the science of Search Engine Optimization (SEO). It’s possible to start using PHP scripts on your site without losing that high ranking of yours.

You’ve probably noticed your site rise and fall in search engine rankings quite a bit. That’s just how it goes since search engines such as Google like to change their algorithms around.

If one day you decide to rename all the files on your site you can be sure your Google listing will moved off page 1 of your target search keyword onto the back-listings of page 67 and beyond.

When you rename a file on your site, and another site links to that file, anyone coming to your site thru that particular link will get an error. When a search engine crawler sees this, it decides your site and decides either to lower your ranking or delete the URL from its search results entirely.

Search engines don’t want to send their visitors to Not-Found pages… makes sense, doesn’t it?

Okay, so let’s say you don’t want to have a ton of broken links across your site, which will cause you to drop in the search results, but you want to tinker with PHP a little bit.

There’s an easy fix for that. You can actually name your PHP scripts so that they end in .htm or .html, and have them run as PHP scripts on your web server. So from the outside world it’ll look as if your site is full of “updated-by-hand” content.

All you have to do is add this line to your .htaccess file:

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

If you don’t have an .htaccess file, all you have to do is put that line of code up there into a new text file, save it as “.htaccess” (with the dot in front) then upload it to your web server.

As soon as you set this up, try going back to your site. Everything should look exactly the same, with the exception that your HTML pages are all now PHP-enabled.

So you could setup a simple script like the one here:
http://www.yourdomain.com/folder/1

… And put that on any HTML page of yours. It will work exactly the same as if the file ended in .php instead of .html. Neat, huh?

You could even go crazy and change that line of htaccess code to add in more weird file extensions, for example:

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

This would parse any page ending in .html, .htm, or .ezine as PHP. So you could name a file something crazy like “subscribe.ezine” and it would work as a PHP script, or in other words as an HTML file with PHP tags in any place you want them.

For thank you pages sometimes I like to make the extension .thanks or .order just to make it harder to guess.

If you wanted to go totally nuts, you could even put something like this in your .htaccess file:

DefaultType application/x-httpd-php

With that, any file without an extension (so if you named a file “download” instead of “download.php”) will be “assumed” to be a PHP file. Any unrecognized extension would default to PHP.

The reason I say you can go totally nuts with this is because now you can now name a file to something that isn’t already used — like site.blog, or form.feedback, subscriber.area or bonus.page.

Experienced PHP/JavaScript Tutor
Solves 19 Of Your Most Frustrating
Direct Response Sales Page Hang-Ups
http://www.marktse.com/recommend/salespagetactics.php

Website Building 29 Mar 2005 06:45 am

Defend Your Thank You Folders From URL Guessers

From: Robert Plank

If you sell downloadable products, you’re going to have a thank you page (a URL where the buyer is redirected after a sale). With just a couple lines of HTACCESS code you can make that folder airtight.

You shouldn’t be putting a buyer through a mandatory signup process to download the product. They already paid, just give them the file right away and offer a chance to opt-in for updates later. Otherwise you’ll be getting lots of support e-mails from people asking where the product is they just paid for.

It’s always smart to name your thank you page something with a number — a name like postorder735.html or thank-you-9987.html will do. You just want to make this impossible to guess.

When it’s possible I like to separate the sales page from the download, so I stash them in a folder called something like download or order. Problem If you have these separate folders, these URL guessers can see the contents of them.

The obvious solution is to put an index.html in the folder, which keeps its contents from being listed… but what if you have, say, 25 of these folders Do you need 25 index.html files

No, and that’s where HTACCESS comes in. Open up a new text file in Notepad and put this text in exactly

Options -Indexes

Then save the file as .htaccess (WITH that dot in front)

Upload it to the root of your web site. Now, if you try to view the contents of a folder that’s missing an index.html file, your browser will show a 403 Forbidden error.

Don’t worry, this won’t block out all files. It will simply keep a guesser from viewing a list of what files are in a given folder.

If you don’t want to see that ugly generic Forbidden page, you can supply your own by adding this line to that .htaccess file of yours

ErrorDocument 403 sorry.html

Now you can put your message into a HTML file (maybe it could be a link to the main page of your site), put it into a file named sorry.html and upload it. Now you’ll have a friendly notice that says anything you want.

One last bonus tip for you. If your forbidden message is extremely short, you don’t even need to create a separate HTML document. If it’s possible for your message to fit all on one line you can remove that ErrorDocument line above from your .htaccess file and put in something like this

ErrorDocument 403 Sorry…

I’m aware that there is a starting quote and no ending quote. That’s just how you have to type it. If you put in a quote at the end there it would show up in your HTML document. I know it looks funny, but it works. Remember that Sorry… text is HTML so you could put in line breaks, links, bold tags, H1, H2 tags, and so on. It’s all up to you.

————————————————
Experienced PHPJavaScript Tutor
Solves 19 Of Your Most Frustrating
Direct Response Sales Page Hang-Ups
http://www.marktse.com/recommend/salespagetactics.php

Website Traffic 28 Mar 2005 11:03 pm

10 Cool Ways To Attract People To Your Web Site

1. Give people a free subscription to your e-zine. Almost everyone is publishing a e-zine nowadays so it’s important to give something extra with the free subscription. You could offer a free gift or advertising when people subscribe.

2. Provide your visitors with free content. Your content will be more attractive to your visitors if it’s up-to-date or original. You could also offer people the option to reprint the content in their e-zine or web site.

3. Offer a free online directory. The directory could be full of interesting ebooks, e-zines, web
sites etc. If people find your directory to be a valuable resource they will visit it over and over.

4. Give your visitors a free ebook. You could also include your own ad in the ebook and allow
other people to give it away. If you don’t want to take the time to write one, you could ask other writers permission to use their articles.

5. Hold free online classes or seminars. They could be held in your web site’s chat room. The
idea of “live” information will definitely entice people to visit your web site. You will become
known as an expert on the topic.

6. Give visitors a free entry into your contest or sweepstakes. The prizes should be something of interest or value to your visitors. Most people who enter will continually revisit your web site to get the results.

7. Let visitors download free software. It could be freeware, shareware, demos etc. You could
even turn part of your site into a free software directory. If you created the software, include
your ad inside and let other people give it away.

8. Offer free online services or utilities from your web site. They could be search engine submitting, copy writing proofreading etc. The service or utility should be helpful to your target audience.

9. Give free consulting to people who visit your web site. You could offer your knowledge via
e-mail or by telephone. People will consider this a huge value because consulting fees can be very expensive.

10. Give your visitors a free membership to your online club. People want to belong to something, why not your online club. You could also give away a free e-zine for club members only.

————————————————–
This article is written by Mark Tse in his Internet Marketing Blog:
http://www.marktse.com/blog/
You are free to share this article if you reserve this resource box.
————————————————–

Next Page »