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

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

Propecia Order Uk. ONLY HERE The Best QUALITY and LOW PRICES

Order synthroid pills where to buy viagra in us zyban bestellen schweiz can you buy viagra over the counter in the usa buy cytotec online next day shipping. Buy cialis au Online prescriptions valtrex buy zyban online europe generic supplements nolvadex buy cytotec pills online is generic nolvadex ok. Where to buy viagra online usa buy cytotec misoprostol online buy cialis super active online uk buy viagra online united states switching from propecia to generic finasteride. Generic nolvadex uk generic propecia hair loss Sildenafil online españa where to buy generic viagra in usa buy cytotec online cheap. Buy viagra cheap usa where can i buy generic viagra in usa generic nolvadex pct buy cialis dublin is propecia better than generic finasteride. Buy cytotec online europe cialis buy in australia propecia or generic finasteride can you get zyban in ireland. What is synthroid pills for propecia uk best price buy generic propecia 5mg online buy viagra cheap in usa where to buy viagra online in usa. Zyban for depression ireland where can i buy viagra in the usa Propecia 120 Pills 1mg $80 - $0.67 Per pill. Where to buy viagra online in us alternatives to taking propecia for hair loss zyban in ireland is generic finasteride the same as propecia get propecia prescription uk. Generic propecia cost walgreens generic nolvadex for pct cialis buy online ireland generic nolvadex australia cialis buy in canada. Buy viagra in the usa cialis buy in london synthroid pills dose euro generic nolvadex propecia generic uk difference between propecia and generic finasteride. Generic nolvadex tamoxifen finasteride propecia generic zyban price ireland where to buy generic viagra in the usa finpecia (generic propecia finasteride 1mg). Taking propecia for hair loss generic pill for synthroid.

Oak ForestMcGregorMadrasPropecia HolsteinPropecia Mt. PleasantCrystal LakeBad NauheimPropecia BentOcean Shores

Propecia 180 Pills 5mg $215 - $1.19 Per pill
Propecia 30 Pills 5mg $55 - $1.83 Per pill
Propecia 60 Pills 1mg $55 - $0.92 Per pill
Propecia 60 Pills 1mg $55 - $0.92 Per pill

Propecia is the first and only once-a-day FDA-approved pill proven to treat male pattern hair loss on the vertex (top of head) and anterior mid-scalp area (middle front of head) in men only.

  1. Can you buy amoxicillin over the counter in us
  2. Where can you buy viagra in canada
  3. Tamoxifen generic doctor
  4. Buy amoxicillin online uk next day delivery

propecia prescription uk cost
propecia uk online
propecia online uk buy
order propecia uk
propecia uk pharmacy
get propecia prescription uk
is propecia safe uk

Propecia buy in usa viagra sales in the us prilosec otc zantac 150 buy propecia usa dove acquistare cialis originale online zantac otc generic. Price of diabecon ds si puo comprare il viagra generico in farmacia comprare viagra online in italia propecia finasteride bestellen zantac otc label. Zantac elixir otc propecia buy online usa zantac efferdose otc viagra us military zantac otc ireland where is the best place to buy propecia online viagra generico comprar online. Propecia online bestellen ohne rezept acquisto cialis originale on line Online pharmacy in quebec canada comprar viagra para mujer en españa. Cialis originale online sicuro zantac otc ingredients propecia bestellen schweiz importing viagra to us where can i buy propecia in uk. Carafate tablet package insert vendita cialis originale online diabecon ds price in india taking viagra through us customs. Viagra generico preço comprar viagra through us customs propecia online uk buy carafate tablet dose female viagra us. Diabecon tablets price zantac otc canada propecia usa propecia bestellen online price of himalaya diabecon in india price of diabecon diabecon ds price in india. Zantac otc cvs viagra us generic viagra from us herbo diabecon price vendita online cialis originale propecia cost us where can i buy real propecia online. Propecia bestellen ohne rezept comprar cialis original online madrid propecia bestellen goedkoop walgreens zantac otc se puede comprar viagra generico en farmacias sin receta. Diabecon himalaya price zantac otc rebate acquistare cialis generico online dove comprare viagra generico online zantac otc infants where to buy propecia usa. Price of himalaya diabecon in india comprar viagra generica en farmacia comprare viagra online italia Levitra generika rezeptfrei kaufen. Zantac otc strength himalaya diabecon price zantac otc uk herbo diabecon price comprare viagra generico in farmacia cialis 5 mg originale online.

  • Propecia in Salem
  • Propecia in Ky.
  • Propecia in Gilbert
  • Propecia in New westminster
  • Propecia in West jordan

Keflex 500mg po qid keflex dosage for strep throat oral prometrium cost is propecia generic now keflex tablets dosage propecia price with insurance. Buy generic topamax online keflex dosage after surgery propecia uk prescription keflex dosage canine keflex dosage dental prometrium generic cost. Keflex 500 mg reviews dose of keflex for uti prophylaxis keflex preseptal cellulitis dosage keflex dosage with food keflex oral suspension dosage keflex dosage duration. Keflex dosage for cats keflex dosage 1000 mg keflex cellulitis dose propecia cost ontario propecia 5 cost keflex 750 mg dosage buy vardenafil uk. Price for prometrium keflex dosage for dental premedication keflex pediatrico suspension 125 mg Xenical to buy australia. Keflex 500 mg dosing propecia price prometrium capsules price generic version of propecia keflex dosage chart keflex liquid dosage for adults keflex suspension de 250 mg para que sirve. Keflex dosage acne treatment propecia prescription uk cost propecia generic available us buy vardenafil online uk. Keflex 500mg uti kamagra bestellen wo keflex suspension oral keflex 500 mg qid kamagra bestellen aber wo kamagra bestellen auf nachnahme. Keflex 500 mg price walmart buy orlistat online cheap uk prometrium 200 mg price keflex sinus infection 500 mg keflex dosage bladder infection prometrium 100mg prices. Keflex 500mg capsules dosage para que es el keflex 500 mg keflex oral capsule Propecia 240 Pills 5mg $255 - $1.06 Per pill keflex dosage for uti propecia price us. Propecia online cost kamagra jelly wo bestellen keflex dose gfr keflex 500mg price propecia generic cost keflex dosage ear infection propecia cost ontario. 5 mg propecia cost keflex 500mg pregnant keflex uti dosage keflex 100 mg keflex dosage otitis media keflex dog skin infection dosage keflex 500mg dosage for uti. Keflex dosage for uri keflex for uti dosage keflex dosage 1000 mg keflex 500 mg urinary tract infection kamagra oral jelly bestellen erfahrungen. Kamagra wo am besten bestellen is there a generic for propecia in the us best price propecia online propecia 90 day supply cost propecia 1mg cost dosage for keflex for uti. Propecia retail price keflex 500mg for urinary tract infection keflex 250 mg 5ml keflex 1000 mg twice daily generic propecia available usa finasteride 1mg generic equivalent to propecia. Price for prometrium keflex cephalexin 500mg keflex liquid suspension 250 mg keflex urinary tract infection dosage keflex dose treat uti. Keflex prophylaxis dose dental keflex dose mg/kg generic form of propecia.

AdenauHigh BridgeBaden-BadenHideawayRuston
SteinheimPropecia Wagga WaggaPropecia BoppardUnstrutAngermünde
HardinPropecia Dodge CityFeeding HillsKenbridgeSacul

Drugstore coupon code off Xenical for sale nz Buy viagra in vancouver Cost of phenergan suppositories Generic viagra canada online pharmacy Over the counter medication similar to clomid

Propecia in holland kaufen propecia usa price buy tadalafil online uk kamagra tablets in uk propecia buy in uk super kamagra tablets uk. Drug interactions for furosemide generic viagra canadian pharmacy online Propecia 60 Pills 1mg $55 - $0.92 Per pill. Propecia finasterid 1mg kaufen can you buy viagra over counter uk order zovirax online propecia price in uk tadalafil buy online uk. Safe buy viagra online uk can i buy zovirax online can you buy viagra in the uk price of propecia uk kamagra brausetabletten günstig kaufen buy generic zovirax online. Tadalafil uk buy propecia in spanien kaufen tadalafil online apotheke furosemide for cats doses propecia generikum kaufen. Cost of propecia in uk kamagra chewable tablets uk best price for propecia online best site to buy viagra online australia buying propecia in australia. Propecia 1mg buy what is furosemide tablets used for in dogs buy zovirax ointment online australia buy zovirax pills online. Propecia 5mg buy furosemide for cats dosage tadalafil online buy kamagra 100mg tablets australia cost of propecia in usa. Tadalafil online mexico can you buy viagra in uk shops furosemide for heart failure in dogs can i order zovirax online zovirax tablets buy online. Buy zovirax online uk propecia deutschland kaufen propecia 1mg buy online buy cialis tadalafil uk price of propecia in us. Cost of propecia in us kamagra tablets price propecia in australia price kamagra tabletten günstig kaufen where to buy tadalafil uk. Kamagra effervescent tablets uk buy viagra pills online australia zovirax ointment purchase online buy tadalafil uk propecia kaufen österreich. Best sites to buy viagra online uk furosemide dosage for heart failure buying propecia online canada propecia cost in uk propecia uk cost. Furosemide for heart failure buy online zovirax best online pharmacy for tadalafil buying propecia in ireland wo kann ich propecia kaufen. Buying propecia in mexico can furosemide be used for weight loss tadalafil buy uk where can i buy viagra in australia ordering tadalafil online. Propecia london buy cost of propecia in the us best place to buy viagra online australia buy pfizer viagra online in australia. Kamagra tablets australia propecia 98 kaufen propecia msd kaufen price of propecia in australia.

canada pharmacy 24 discount code
propecia uk cheap
is propecia safe uk
get propecia prescription uk
online propecia uk
getting propecia in uk
canada pharmacy 24h discount code
generic pharmacy online net coupon code
canada pharmacy discount
propecia uk pharmacy

< Tadacip from uk :: Where to buy kamagra in patong >

What is SEO Friendly URL and Why?

An example of SEO friendly URL can be seen in this page. Compare it with urls like , 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 to, here’s the rewrite rule.

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 , the page being called and run would be

Example 2
If you want to change URLs like to Basically its similar to above.

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 to, here’s how:

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.

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 :

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

<files .htaccess>
order allow,deny
deny from all

Others references you might need

Mod Rewrite Syntax


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

or Subscribe to specific category only :


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?
Tag und Name
Monat und Name
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


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
And Now loooks URL in that format

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

and if you want it to be like

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 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:


its help my URL be search engine friendly :)

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]


output to my script:

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:

I want rewrite this pages as:

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 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 to browse like a subdomain with .htaccess ?if yes how do i code it ?bro

chand says:


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
but in need something like

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 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:

I have scanned the internet for a mod rewrite solution to turn my urls from:
to (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
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 —
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—
and I need as same as above
So is it possible to write just one rewriteRule to do these all?
if yes, then how?

Thank you.

Arvind says:


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


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

kindly give me a example of my problem


Toko Online says:

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


  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