Create SEO Friendly URLs With Htaccess Mod Rewrite in 3 Easy Steps

Posted in SEO , Web Development on 18 November 2009 55 comments

Viagra Prescription Online Australia. ONLY HERE The Best QUALITY and LOW PRICES



Provera pill and weight loss cheapest price for viagra what is the best over the counter substitute for viagra generická viagra 100mg what is a good over the counter substitute for viagra. Provera pill weight loss birth control pill shot depo provera provera pill form how much will generic lexapro cost. Cheap alternative for viagra provera pill uses price for bactroban ointment lexapro cost ireland maxalt melt australia. Over the counter alternatives for viagra viagra generic 200mg cost of lexapro in northern ireland when to start birth control pill after provera. Wellbutrin xl 150 mg 30 film tablet provera pill picture provera pill cost birth control pill vs depo provera getting pregnant after provera pill. Ventolin hfa 90 mcg inhaler cost us pharmacy cheap viagra cheap aussie viagra price for bactroban provera pills for sale viagra 50 mg tablet price. Provera missed pill bactroban for acne scars do you need a prescription for bactroban cream is the provera pill a birth control viagra 100mg cheap uk. Provera 10 day pill how much does generic lexapro cost without insurance cost of maxalt in australia provera pills bleeding. Cheap substitute for viagra provera pill provera pill and pregnant viagra generic 100mg cheap alternative to viagra cheap viagra au depo provera or pill. Viagra for sale in uk generic brand of flagyl is there an over the counter medicine for viagra cost of lexapro in canada cheaper alternative for viagra. Maxalt migraine australia is a prescription required for viagra in uk bactroban mupirocin ointment for acne provera pills 10 mg. Viagra 100mg cheap viagra cialis levitra online australia viagra 25mg price uk kmart generic pharmacy list provera pill contraception. Maxalt in australia maxalt cost australia cost of ventolin inhaler in usa is there an over the counter for viagra viagra generic 25mg depo provera vs mini pill. Bactroban cream for acne scars using bactroban for acne cheapest viagra australia provera pill stop bleeding how much does lexapro cost australia provera pill to delay period. Provera pill 10mg depo provera shot vs birth control pill over the counter substitute for bactroban bactroban for acne reviews. Bactroban-reviews for acne ventolin cost uk otc substitute for bactroban provera pill reviews viagra for sale uk next day delivery prescription for bactroban. Ventolin hfa 200 metered inhalations cost provera pills 5mg lexapro cost without health insurance.

WyongViagra RichmondViagra GriffithEast KootenayMaitlandKelownaGeraldtonCanberraBundaberg


Viagra 360 Pills 100mg $369 - $1.03 Per pill



Viagra comes as a tablet containing sildenafil citrate, to take by mouth. For most men, the recommended dose is 50 mg. taken, as needed, approximately 1 hour before sexual activity. However, sildenafil citrate may be taken anywhere from 4 hours to 0.5 hour before sexual activity. Based on effectiveness and toleration, the dose may be increased to a maximum recommended dose of 100 mg or decreased to 25 mg. The maximum recommended dosing frequency is once per day.

Cost of amlodipine 5 mg Viagra online kaufen europa Best site buy cialis online Buy clomid online uk steroids Prednisone deltasone 20 mg tablet Canada drug pharmacy free shipping Unisom sleepgels buy online Viagra canada customs Propecia buying Amoxicillin and clavulanate potassium cost


  1. viagra online sydney
  2. viagra online nsw
  3. viagra for sale melbourne
  4. viagra online perth wa


Generic drugs like viagra is there a generic drug for cialis or viagra viagra tablets uk sale can u buy prednisone over the counter. Is prednisone available over the counter viagra super force drugstore erythromycin time between doses can you buy prednisone over the counter in canada. Erythromycin doses viagra where to buy online over the counter substitute for prednisone xenical roche australia. Can you buy prednisone over the counter where to buy viagra in united states haldol tablets 5mg xenical roche online buy cheap synthroid online buy drugs online viagra. Xenical 120 mg hartkapseln roche pfizer viagra for sale uk haldol tablete nuspojave synthroid cheap price viagra canada drugs. Prednisone over the counter substitute xenical roche comprar online where can i buy viagra in nottingham erythromycin doses for tonsillitis prednisone over the counter australia. Over the counter steroids like prednisone prednisone over the counter canada roche xenical 120 mg generic pharmacy quezon city prednisone over the counter alternative. Cheap synthroid what is an over the counter drug for prednisone generic viagra drugs is there anything over the counter like prednisone. Buy synthroid online cheap viagra sale uk cheap over the counter drug interactions with prednisone liquid viagra for sale uk. Cheap retina monitor uk viagra sales online haldol 1 mg tablet cheap retina monitors erythromycin ophthalmic ointment doses viagra for sale uk next day delivery. Over the counter like prednisone where to buy viagra in nottingham viagra over the counter drug generic viagra drug viagra drug price. Is there an over the counter alternative to prednisone can u get prednisone over the counter Generic zovirax cost discount drug card viagra xenical roche kaufen. Prednisone and over the counter medications where to buy viagra in calgary buy retin a cream cheap online is viagra now a generic drug. Viagra in uk for sale where can you buy viagra in belfast prednisone 5mg over the counter cheapest place to buy retin a micro.

  • Viagra in Bellevue
  • Viagra in Victor harbor


Viagra generika aus deutschland bestellen what is erythromycin stearate tablets used for erythromycin 500mg price india. Erythromycin ophthalmic price buy prozac online canadian pharmacy erythromycin price in the philippines. Erythromycin eye ointment cost buy female viagra canada obagi tretinoin cream price a drug that blocks the action of carbonic anhydrase in parietal cells. Viagra generika niederlande where to buy viagra in canada erythromycin tabletten rosacea cheap viagra canada pharmacy buy real viagra from canada. Ysa erythromycin lotion price viagra generika tabletten cheapest online viagra from the uk buy prozac online ireland Where to buy viagra in mississauga. Amoxicillin clavulanate potassium coupon erythromycin generic cost female viagra online canada erythromycin 250 mg tablets for acne. Viagra generika verschreibungspflichtig viagra online from uk cheapest viagra online canada perrigo tretinoin cream 0.025 price erythromycin 250mg tablets used for. Erythromycin 250 mg tablet online pharmacy viagra uk tretinoin 1 cream cost erythromycin tablets dosage acne. Erythromycin base tablets erythromycin tablets price viagra in uk chemists buy erythromycin tablets erythromycin estolate tablets usp. Erythromycin antibiotic price erythromycin 250 mg tabletki ulotka tretinoin gel 0.025 cost real viagra online canada flawless erythromycin solution price viagra for sale sydney. Erythromycin cost cost for erythromycin 24. a drug that blocks carbonic anhydrase in parietal cells would result in erythromycin gel price in india. Erythromycin estolate tablets uses erythromycin price india online viagra uk cheap erythromycin and zinc acetate lotion price viagra online sales uk erythromycin and benzoyl peroxide topical gel price. Tretinoin 0.05 cream price erythromycin estolate tablets usp 250 erythromycin tablets 250 mg reviews viagra generika was ist das erythromycin stearate 250 mg tablets. Where can i buy viagra from canada viagra online pharmacy in uk viagra generika billig bestellen erythromycin tablets 500mg dosage.

NoondayQuitmanBay SpringsOrientDes Plaines
Viagra SenatobiaBelle PlaineViagra JeffersonvilleViagra FleetwoodAbbotsford
FentonViagra GwinnMechanicsburgViagra West LebanonLeonardtown


  1. Buying kamagra online in australia
  2. Cialis generico farmacia roma
  3. Buy tadalista 60 mg


Can amitriptyline get you high if so how much viagra generika tabletten comprar viagra femenina en barcelona uses for the drug bactrim bactrim drug rash picture. Bactrim interactions with other drugs bactrim drug uses drug interactions bactrim lexapro prilosec generic brand how much does amitriptyline cost uk. Buy strattera uk viagra 25mg or 50mg prilosec otc walmart brand order antabuse online how much is a lethal dose of amitriptyline generic drug name for bactrim. Bactrim drug induced liver injury is bactrim and septra the same drug imitrex otc usa generic vs. brand name prilosec bactrim and warfarin drug interaction. Can i order antabuse online bactrim ds 800-160 drug interactions bactrim drug interactions warfarin bactrim drug food interactions. Bactrim drug label imitrex cost usa bactrim and drug interactions drug induced thrombocytopenia bactrim bactrim and valtrex drug interaction comprar viagra por internet seguro. Viagra for sale melbourne viagra online perth wa how much amitriptyline will make you sleep order antabuse online canada antabuse order online. Viagra tablet price in kerala viagra or cialis over the counter Best place to buy genuine viagra comprar viagra por internet es seguro drug rash from bactrim bactrim drug interactions ibuprofen. Bactrim septra drug 50 or 100mg viagra how much amitriptyline for migraine which drug is more effective viagra or cialis does viagra increase or decrease blood pressure. Bactrim drug indication bactrim drug interactions viagra tablets for sale uk can you get viagra or cialis over the counter. Strattera buy online uk where can i buy strattera uk does viagra or cialis lower blood pressure prilosec walmart brand. Viagra brand or generic onde comprar viagra online em portugal bactrim and coumadin drug interaction can you order antabuse online. Antabuse online order comprar viagra por internet fiable bactrim drug contraindications how much does amitriptyline cost without insurance. Bactrim drug rash treatment strattera online uk methotrexate and bactrim drug interaction 100mg viagra or 20mg cialis order antabuse online uk. 25 50 or 100mg viagra how much does amitriptyline cost the nhs viagra tablet price in pak over the counter viagra or cialis comprar viagra original online.

  1. 100 generic pharmacy
  2. generic drugs canada pharmacy
  3. generic pharmacy las pinas
  4. viagra pfizer online australia
  5. viagra online melbourne
  6. generic pharmacy store
  7. online generic viagra australia
  8. generic pharmacy cpt code
  9. generic pharmacy makati
  10. online pharmacy australia viagra
  11. generic levitra canada pharmacy
  12. generic pharmacy uk


< Comprare proscar online :: Kamagra online kaufen deutschland >

What is SEO Friendly URL and Why?

An example of SEO friendly URL can be seen in this page. Compare it with urls like http://mysite.com/?t=34 , you will find it easier to remember and the it also clearly tells you what this page is about. Furthermore, the words in the URL might match the search keywords, bringing more traffic from search engines.

Make SEO friendly URL yourself

I don’t have to worry about SEO friendly URL in WordPress since its already built-in. However, I need it for my premium wordpress themes website, which is not based on WordPress. So I started to look into this matter.

Using htaccess and mod rewrite, you can make SEO friendly yourself in 3 easy steps.

1. Creating .htaccess file

Open NotePad (yes, the windows notepad) > File > Save As > Change the “Save as Type” to “All Files” > enter “.htaccess” as the name and press Save. You’ve created a htacces file.

Now paste this codes below into it.

Options +FollowSymLinks
 
RewriteEngine On

The first line Options +FollowSymLinks is required for some server configurations.

2. Create your own rewrite rule

Example 1
For example, if you want to change links like http://mysite.com/index.php?topic=rules to http://mysite.com/topic/rules/, here’s the rewrite rule.

?View Code HTACCESS
Options +FollowSymLinks
 
RewriteEngine On
RewriteRule ^topic/([a-zA-Z0-9]+)/$ index.php?topic=$1

• Like regular expressions, the [a-zA-Z0-9] matches lower and uppercase of alphabets and numbers.
• The asterisk inside the brackets + is a quantifier that match 1 occurence to infinite occurences.
• Combining them, ([a-zA-Z0-9]+) matches alphanumerics of at least 1 character.
• The caret ^ means “start with”, meaning the URL starts with the word “topic”.
• The dollar sign $ means “end”, meaning the URL ends with a slash.
• The $1 is backreference, it carries the content of the first group of brackets.

In other words, when user enters http://mysite.com/topic/faqs/ , the page being called and run would be http://mysite.com/index.php?topic=faqs

Example 2
If you want to change URLs like http://mysite.com/index.php?product=productname&price=30 to http://mysite.com/products/productname/30/. Basically its similar to above.

?View Code HTACCESS
Options +FollowSymLinks
 
RewriteEngine On
RewriteRule ^products/([a-zA-Z]+)/([0-9]+)/$ index.php?product=$1&price=$2

• The [0-9] in matches numbers only.
• The plus sign is a quantifier that match 1 or more occurences.
• Combining them, ([0-9]+) means 1 or more numbers.
• Similarly, $1 will be the first brackets : product name and $2 would be the second brackets : price.

Example 3
If you want to change URLs like http://mysite.com/article.php?id=45 to http://mysite.com/article-45.html, here’s how:

?View Code HTACCESS
Options +FollowSymLinks
 
RewriteEngine On
RewriteRule ^article-([0-9]+)\.html$ article.php?id=$1

• The new thing here is the \. (backslash followed by a dot).
• The backslash here “escapes” the dot, so that the dot means a real dot instead of “anything”.

3. Extra Stuff

Custom 404 error page

Put this in your htaccess if you would like to have a custom 404 error page instead of the default one.

?View Code HTACCESS
ErrorDocument 404 /404.php

Change the 404.php to your page.

Disable directory browsing

For security purpose, its best to disable directory browsing so that people won’t know what files you have. Use this :

?View Code HTACCESS
Options All -Indexes
Protect .htaccess files

This should disallow other to access your .htaccess file, just like disallowing others to access your wordpress’s wp-config.php

?View Code HTACCESS
<files .htaccess>
order allow,deny
deny from all
</files>

Others references you might need

Mod Rewrite Syntax

 

Posted by Zen on 18 November 2009 • 216,231 visits 55 comments
Tags : ,


or Subscribe to specific category only :




  - 55 Comments


Toronto Internet Marketing says:

i can imagine it hurts for some people when they find out a long time after they made their URL that their URL is not keyword friendly. After you have built many bcklinks, gotten your reputation, and you have a long lasting domain age.

Doreen says:

Hi Thank u for the Tipps. What is the right Backend-Setting in Permalinks of WordPress.

Allgemeine Optionen: only in german here?
Standard
Tag und Name
Monat und Name
Numerisch
Benutzerdefinierte Struktur

zen says:

For wordpress, I use “Custom Structure” : /%postname%/

Cheers :)

Gary says:

Very helpful post. It has been very difficult for me to find anything good on this topic. thanks.

mark says:

thanks, that was a nice post to go through, I look forward to reading more of your stuff

sovanndy says:

Could you explain about (.*?)?

what does it mean?

I don’t understand this rule

car freak says:

great tips,,thanks a lot

Tanya says:

Ey, what about phpbb3? it is possible do something like that in forums? i found all the time mods like Phpbb seo, but it means a lot of changings the i don’t wanna do.

thanks for the tips!!!

Aurora says:

I too have that problem. This I tried and it only shows on the tab not on the web address in phpbb 3.07_pl. I tried the “easy mod” and that just gave me a blank page and it was NOT easy, so I had to reinstall my board. I hope they find a good solution soon. :)

Balaji J H says:

Thanks a lot
You saved me others worked but redirects to the real url
Only yours does the work

Thanks

Nayan Paul says:

Thanks Sir , Very Handy and useful post..

I have some query about seo friendly url,please help me

My demo site URL looks like
http://www.mydomain.com/index.php?module=listing&action=view&page=1
And Now loooks URL in that format
http://www.mydomain.com/index.php/module/listing/action/view/page/1

How i do that thru htaccess ? please Help Me , Thanks Again….

Ranjan says:

Hey, anybody can help me. I couldn’t able to do url rewriting.
here is my code of “.htaccess” file,

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^name/(.*)/$ rewrite.php?name=$1

Jyoti says:

Hi, Ranjan, Sory i couldn’t get u…
anybody can help him? thanks in advance.

Dhruv Kumar S says:

Hi Ranjan,

If your url is http://www.website.com/rewrite.php?name=ranjan

and if you want it to be like http://www.website.com/name/ranjan/

Use this

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^name/(.*)/$ rewrite.php?name=$1

And make sure your rewrite.php file is written accordingly.

Abhi says:

Hey what to change in rewrite.php file ? thanks in advance

news and updates says:

thanks for your great and value share, actually i’ve been searching for a couple days for it

news and updates says:

i’ve find your blog appear on google, think you have good Seo technic, great job anyway.

Real Estate Analysis says:

Thanks for the easy to follow guide. I needed to create the SEO url’s on my RealEstateAnalysisFREE.com website for a long time, but always had troubles to figure it out. Now I just copied your code, change it a bit and it works like a charm! Thanks.

Needa says:

awesome its helpful :D

Helloo says:

Thank’s

its help my URL be search engine friendly :)

http://www.auctionsbuy.com

Karnataka Medical says:

u gave the information in simple words. ^ key should always be used if it is the start of string which is to be matched, otherwise it will be matching URL names from in-between also, which may create trouble.

medical assistant says:

I tried the follwoing with no sucess:

RewriteRule ^directory/(.*)/$ index.php?q=$1 [L]

SFL: http://example.com/top-directory/directory/123

output to my script: http://example.com/top-directory/index.php?q=123

Can somebody tell me what am i doing wrong?

zen says:

You missed a slash after “123″

Milos says:

Hello, it’s a very good post. I have a little problem:
My pages is:
index.php?=detalji?265
index.php?=detalji?112
index.php?=detalji?221

I want rewrite this pages as:
article-265.html
article-112.html
article-221.html

I made a .htaccess file like this:
Options +FollowSymLinks

RewriteEngine On
RewriteRule ^article-([0-9]+)\.html$ index.php?=detalji?$1

But when i tipe a http://www.lcd.rs/article-221.html I give onli index.php page, not index.php?=detalji?221

Do you now where I make a mistake?

Tnx a lot,
Milos Popovic

learning and teaching says:

great post with good information. Is it possible to make http://anisbd.com/ebooks to browse like a subdomain http://ebooks.anisbd.com with .htaccess ?if yes how do i code it ?bro

chand says:

hi,

i have tried whatever show in this post. but my url is notwoking. see the url and suggesst me how to modify
if i am clicking on any of the menu it is coming like http://www.stage100floors.com/100bestbuy/search.php?categoryId=24.
but in need something like
http://www.stage100floors.com/100bestbuy/products/

my code is like
RewriteRule ^/100bestbuy/products/(.*)/$ 100bestbuy/search.php?categoryId=$1 [L,NC]

i am trying from 3 day but no result in localhost aswellas in server.
help me please…………….

Zen says:

perhaps you can try this:

RewriteRule ^100bestbuy/products/(.*)/$ 100bestbuy/search.php?categoryId=$1

and put the htaccess file in stage100floors.com root.

gozada says:

Hey, anybody can help me. I couldn’t able to do url rewriting.
here is my code of “.htaccess” file,

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^name/(.*)/$ rewrite.php?name=$1

thank you

a.r.bhuyan says:

its very important issue for seo learner .thanks for this post.

Bill Wynne says:

Great tips using the htaccess file!

Zeeshan Parvez says:

Just what the doctor ordered! Exactly what I was looking for to integrate with my cms. I needed a way to get seo friendly urls. Now I have the answer. Thanks!

Jaybee says:

Hi,
I have scanned the internet for a mod rewrite solution to turn my urls from:
http://www.domain.com?section=this&catid=1&articleid=1
to
http://www.domain.com/about-us/the-team (like they do in WordPress)
And I do not want to pass numbers in the urls.

It has forced me to hard code all my dynamic links in my htaccess which becomes tiresome when you add more content onto the website because this method is not automated. eg.

————————————————–
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^the-team$ index.php?section=this&catid=1&articleid=15 [NC,L]
————————————————–

Please help me come up with a workable automating solution just like they do in WordPress. Note: All the content is stored in a database.

google places says:

Very useful list Zen, .htacces is something I’ve always struggled with and this has helped me get my head around it a bit. Before it was trial and error really but this has helped me understand why I’m actually using each separate line of code. Cheers

mitra says:

Hi Zen, really its a very good tutorial…..
But I have a problem with url rewriting.
My present link is
http://localhost/htaccess/products/product.php?pname=computer&id=5
and I want http://localhost/htaccess/products/computer/5/
So how can I do it? and what should I write within href=”"?
basic folder structure is —
root/products/product.php
root/customers/customer.php
And presently the hyperlink file is within index.php at root folder.

And another thing, there are similar pages like product.php and corresponding different parameters, suppose—
http://localhost/htaccess/customers/customer.php?cusname=mitra&id=10
and I need as same as above
http://localhost/htaccess/customer/mitra/10
So is it possible to write just one rewriteRule to do these all?
if yes, then how?

Thank you.

Arvind says:

Hi,

I have been trying on localhost to rewrite this URL (http://localhost/cms/categories.php?id=1) to (http://localhost/cms/category/1)

I used the following rewrite condition (and also others) in .htaccess file but everytime it has been failed:

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^cms/category/([0-9]+)$ /cms/categories.php?id=$1 [R,L]

can anybody help me to tell where I am wrong?

Thanks for help in advance

arif says:

i have a url like this

http://abc.local/stock/detail.php?id=1 i need to change this like

http://abc.local/stock/product-title.html

i need to show product title which will come from the database

kindly give me a example of my problem

thanks

Toko Online says:

Nice, with htaccess rewrite rule every web url looks easy.
Thanks

Trackbacks

  1. Step 2: SEO Friendly URL | Siddharth Shah | Sid | Siddhath SEO Tips | Sid photography
  2. .htaccess REWRITE RULES | .htaccess REWRITE RULES - .htaccess REWRITE RULES - .htaccess REWRITE RULES = .htaccess REWRITE RULES | NURSING CARE
  3. how can i remove .html from url? - Bizzteams - Page 2

Leave a Reply

You must be logged in to post a comment.

Previous Post
«
Next Post
»