10-06-2006, 01:01 PM
The other topic died, so I'm restarting it.
I've noticed most of us use the type of PHP includes where we have to type our urls like this:
http://www.sitename.com/index.php?id=page
http://www.sitename.com/?id=page
http://www.sitename.com/?page=page
I'm going to suggest you,DON'T use those type of URL's. Why are reasons you shouldn't use query strings in url's:
Un-Spiderable
Search Engines don't index your pages if you have Querystrings in URL's, because they may be caught in loops. And if they do inde your pages, they only index 2 pages instead of all.
Bad Rankings
They'll give you bad ranking on google and other engines. Meaning, that insted of getting a page rank 4/10, you get 2/10 or zero most of the time.
Hard to guess
People are used to sitename.com/directory/pagename.html, and they have a hard time guessing those manipulated URL's.
Down below are two rewrite rule codes. Paste them into .htaccess file. They work the same, just the first one is for people who like using folders for there files, such as
page.com/lol/xd, and the first is for people who use raw url's like this page.com/lolxd.
Second One
This way, it makes search engines index your URL's the easier way; by fooling them. Remember, you may still use your original url, and be sure to paste this in between your <head></head> tags:
After this, test your URL's, and they should be working! Some hosts don't allow mod_rewrite, or .htaccess files, so be sure to ask if you're planning to use mod_rewrite.
I've noticed most of us use the type of PHP includes where we have to type our urls like this:
http://www.sitename.com/index.php?id=page
http://www.sitename.com/?id=page
http://www.sitename.com/?page=page
I'm going to suggest you,DON'T use those type of URL's. Why are reasons you shouldn't use query strings in url's:
Un-Spiderable
Search Engines don't index your pages if you have Querystrings in URL's, because they may be caught in loops. And if they do inde your pages, they only index 2 pages instead of all.
Bad Rankings
They'll give you bad ranking on google and other engines. Meaning, that insted of getting a page rank 4/10, you get 2/10 or zero most of the time.
Hard to guess
People are used to sitename.com/directory/pagename.html, and they have a hard time guessing those manipulated URL's.
Down below are two rewrite rule codes. Paste them into .htaccess file. They work the same, just the first one is for people who like using folders for there files, such as
page.com/lol/xd, and the first is for people who use raw url's like this page.com/lolxd.
Code:
RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)?$ index.php?id=$1/$2Second One
Code:
RewriteEngine on
RewriteRule ^([^/]+)?$ index.php?id=$1This way, it makes search engines index your URL's the easier way; by fooling them. Remember, you may still use your original url, and be sure to paste this in between your <head></head> tags:
Code:
<base href="http://www.yourname.com/">After this, test your URL's, and they should be working! Some hosts don't allow mod_rewrite, or .htaccess files, so be sure to ask if you're planning to use mod_rewrite.
