Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

Welcome to Webmaster Forums 101!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th January 2005, 03:38 PM   #1
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Post Basic Mod Rewrite: Fake Files

Let's say you have a links directory script. To view a category you have to go to this URL: http://www.yourdomain.com/category.php?id=10

Now as some of you might know some Search Engines can't index anything after the ?. However a lot of Search Engines now have this feature.

But you still want to display the categories in amore Search Engine friendly format. How can you do this?

Easily, you can do this with a .htaccess file and a bit of code within it.

Here's the code to save in the .htaccess file:

Code:
##### Start the engine RewriteEngine On ##### Set a base rule to / RewriteBase / ##### Match the string and parse the query RewriteRule ^category-([0-9]+).html$ /category.php?id=$1


That's it! Upload the .htaccess file and instead of linking to:

http://www.yourdomain.com/category.php?id=10

You can now link to:

http://www.yourdomain.com/category-10.html

And the Search Engines can now easily index your page

Enjoy!

Tech
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP and Creating New Files Ben Server-Side Scripting & Databases 4 15th March 2005 03:03 PM
Mod Rewrite and Sub Folders Ben Website Design & Coding 11 23rd February 2005 10:21 AM
Advanced Mod Rewrite: Fake Filesd Mr. Tech Tutorials 0 17th January 2005 03:54 PM
PHP: How To Upload Files Using PHP Mr. Tech Tutorials 0 17th January 2005 02:23 PM

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 04:16 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore