2 Replies - 383 Views - Last Post: 16 July 2013 - 12:23 PM Rate Topic: -----

#1 Hasihaseeb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-October 12

htaccess seo friendly urls

Posted 16 July 2013 - 11:20 AM

My Web URL ( example.com/category/image.php?=singapore-city )

I would like to make it as SEO friendly URL , as example.com/category/singapore-city /

How to do this using htaccess ?
Is This A Good Question/Topic? 0
  • +

Replies To: htaccess seo friendly urls

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5960
  • View blog
  • Posts: 23,235
  • Joined: 23-August 08

Re: htaccess seo friendly urls

Posted 16 July 2013 - 12:23 PM

http://www.sitepoint...-url-rewriting/
Was This Post Helpful? 0
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3637
  • View blog
  • Posts: 5,764
  • Joined: 08-June 10

Re: htaccess seo friendly urls

Posted 16 July 2013 - 12:23 PM

That seems like an odd URL. Why is the key missing from the key-value pair in the query string?


Anyway... Contrary to popular myth, those are in fact not so much SEO friendly URLs as they are human friendly URLs.

Computers like well formatted data. To a computer, the URL example.com/?city=singapore is far more useful than example.com/singapore. Why? Because the former clearly states, in a well know and easily parsable way, that the value is a "city", while the other does not. To a human it's obvious that Singapore is a city, but search engines would have to be extensively programmed to make that connection.

So, if your goal here is making your site more easily indexed by a search engine, keep the key-value pairs in the query string. If your goal, one the other hand, is making the URL look better to visiting users, then you should consider this kind of change. (Personally I would. Search engines have plenty of data, other than the URL, to work with. At least if you content isn't royally messed up.)


Quote

How to do this using htaccess ?

The answer to that question is: mod_rewrite. It allows you to specify rewrite rules to be applied to URLs, allowing you to map "fake" URLs to real locations. If this is new to you, I suggest googling for some tutorials. There are a bunch of those out there. - This also requires some understanding of Regular Expressions. You'll want to read up on those as well if you want to make this work.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1