Home arrow Web Services arrow Page 2 - Make Dynamic URLs Search Engine Friendly
WEB SERVICES

Make Dynamic URLs Search Engine Friendly


Using a database to dynamically create web pages makes for a much improved site in many ways. However, such URLs are not very search engine friendly. Search engines are much better at indexing static pages, and don't do a good job of following hyperlinks that contain query strings. The advantages of a dynamic site are overwhelmingly obvious--so what is to be done? With a little extra effort, you can create a dynamic site that is easily crawled by webbots.

Author Info:
By: Peter Lavin
Rating: 4 stars4 stars4 stars4 stars4 stars / 69
March 01, 2004
TABLE OF CONTENTS:
  1. · Make Dynamic URLs Search Engine Friendly
  2. · Check Your Server
  3. · Create an .htaccess File
  4. · Upload .htaccess to Your Server
  5. · Test the Results
  6. · Modifying Your Code
  7. · Conclusion

print this article
SEARCH DEVARTICLES

Make Dynamic URLs Search Engine Friendly - Check Your Server
(Page 2 of 7 )

In the introduction we referred to something called mod_rewrite. This is a module that is usually compiled into Apache web servers and is fairly complex to configure. But this is the concern of server administrators and need not worry us here. mod_rewrite makes use of a file called .htaccess to perform its rewrites and creating this file is all we will need to do. .htaccess tells the server how to convert between dynamic and static URLs. Writing this file usually requires some knowledge of regular expressions. Like many of us, you may wish that you had greater facility with regular expressions but have never quite gotten around to learning them properly. Well donít worry - creating the .htaccess file will require absolutely no knowledge of regular expressions.

To ensure that your web host supports mod_rewrite you could send an e-mail to tech support or find out for yourself by creating the following text file:

<?php
 phpinfo();
?>

Save it as info.php, upload it to your server and invoke it by typing 

http://www.mysite/info.php

into the address box of your browser.

The function phpinfo is very useful for determining how your server is configured, for looking at environment variables, cookies and the like but right now we are only concerned with mod_rewrite. Look for the heading "Apache" and then "Loaded Modules". You should find mod_rewrite amongst the many modules listed there. If so you are all set to begin and if not, speak to your web host.


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials