This site is for sale, Learn More

Make Your Dynamic Web Site Search Engine Friendly Part 2

Making Dynamic Sites Search Engine Friendly

By Brad S. Konia

Originally Published: July, 2003

Continued From: <<< Make Your Dynamic Web Site Search Engine Friendly Part 1

2.) Some engines won't index pages containing a question mark or other special symbols.

Dynamic URLs & Apache-based Web sites...

Mod-Rewrite & PHP Instructions:

  1. Open Notepad on your Windows machine (or a comparable text editor if you're using a Macintosh). Avoid using MS Word or any type of word processor because these programs add extra formatting characters by default that will cause problems.
  2. Copy and paste the following text into Notepad:

    RewriteEngine on
    RewriteBase /basedir
    RewriteRule ^productid([^.]+).*$ yourscript.php?id=$1 [T=application/x-httpd-php]

  3. Change /basedir to the name of the directory containing your dynamic pages. This will normally be just a "/" unless the pages are in a subdirectory, in which case it would be a "/" followed by the name of the subdirectory.
  4. In the "RewriteRule" line, after the question mark, change "id" to whichever variable you're using to pass your product id in order to display the product detail page. Navigate to the link on your site that displays a product detail page from your database. Study the URL in your browser. Normally you'll only have a question mark followed by the product ID. However, if other parameters exist, you'll need to rewrite those too.
  5. In the "RewriteRule" line, change yourscript.php to the name of your dynamic product detail page. This will be the script name seen in the URL often ending in ASP, PHP, or various other extensions. The script name will normally precede the question mark.
  6. If your site does not use PHP, change "T=application/x-httpd-php" to the MIME type for the language that you use. If you have questions, the technical documentation for the mod-rewrite functions can be found at:
  7. Save the file to your local computer. Name it htaccess.txt.
  8. Upload the file to your Web site in ASCII mode.
  9. Configure your FTP program to display hidden files. Hidden files are files that start with a dot on UNIX or Linux based operating systems. Most FTP programs have an option to display hidden files either on the preference screen or in the settings for the individual FTP site. Some FTP programs will allow you to add parameters to the list command that will display hidden files. In that case, the parameter that you would need to add to the ls command is "-al" (without the quotes).
  10. Test your FTP program to make sure you can view hidden files. Try renaming a non-essential file on your Web site to a filename that starts with a dot. Make sure that it shows up in the directory listing. Then make sure you can rename it back to its original file name.
  11. Rename htaccess.txt to .htaccess (starts with a dot, and no file extension). This will activate your changes.
CAUTION: If you have done something wrong in the htaccess file, your site may stop working after you rename the file. In that case, rename .htaccess back to htaccess.txt and the site should start working again. That's why it's important that your FTP program is configured to see hidden files.

Dynamic URLs & Microsoft IIS Web sites...

URL Rewrite Testing

Continued From: <<< Make Your Dynamic Web Site Search Engine Friendly Part 1

This article is copyrighted and has been reprinted with permission from FirstPlace Software.

Site Promotion Articles Indexes:

Guaranteed Top 10 Search Engine Ranking
Get A Top 10
Search Engine Ranking

Bullet-Proof Google Promotion

Google's Disavow Links a Trick?

5 Things About SEO

Google's Disavow Links Tool

Google +1 Clicks & SEO

Manual Penalties & Your Rankings

10 Recent Google Algorithm Changes

Google's New Web Page Spider

Search Engine Safe URL Redirect

KEI: A Good Indicator For Useful Keywords?

Google PR Improved With Domain Redirection

Dealing With A Google Ban

All You Need To Know About Google Suggest

Is Your WebSite Guilty By Association?


Search Engine Promotion Help Site Map

Valid HTML 4.01!

© 2024 Search Engine Promotion Help
June 12 2024 15:32 UTC