473,382 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How To make SEO Friendly URL

56
Hi Friends , My need I depicted Below.... Please Help me how it can

possible.


Explanation by Example :

Suppose, there is one website url :
www.example.com/article.php?id=5

I can convert the URL in SEO friendly manner with rewrite rule in
.htaccess file as below :
www.example.com/article/5 [I CAN DO THIS]

But what I want is, The name of the Article in the URL like :
www.example.com/article/the_name_of_the_article_here [I WANT THIS]

I tried lot for the solution of this problem but didn't got any.
Please tell me if you can suggest any tip.

You can contact me : <email removed>

I am waiting for your Good help

Regards
Anes
May 16 '10 #1
2 2586
phobia
5
You need to create a column e.g. your article table (given that the articles are in a database) that holds that value, so that you can look it up that way.

You could e.g. set the value automatically from the title on save just by making it lowercase, restricting it to be alfanumeric, and replace spaces with underscores.

Example table:
Expand|Select|Wrap|Line Numbers
  1. ID     TITLE          URL_SLUG     CONTENT
  2. 5      The Name    the_name       .....
  3.  
Then the SQL needs to be something like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT title, content FROM articles WHERE url_slug = '$slug'
  2.  
Just make sure to clean the contents of $slug before running it into the query, to avoid sql injection etc.

Does it make sense?
May 16 '10 #2
Atli
5,058 Expert 4TB
I can convert the URL in SEO friendly manner with rewrite rule in
.htaccess file as below :
www.example.com/article/5
Note that changing an URL from example.com?article.php?id=5 to example.com/article/5 doesn't make the slightest difference to a search engine. As far as SEO goes, the difference this makes is negligible. Neither does putting the title in the URL. -- This may have had an effect in the past but search engines have gotten smarter and the effect it had back then has long since been eliminated.

These sort of changes are purely cosmetic, intended for the users of the site; so they can more easily remember and/or use the URL. Usually the effort of designing a proper rewrite rule is wasted, and you always run the risk of accidentally messing up the URL, which may even hurt your SEO.

See Dynamic URLs vs. static URLs in the Goolge Webmaster Central Blog, for example.
If you have a dynamic URL which is in the standard format like foo?key1=value&key2=value2 we recommend that you leave the url unchanged, and Google will determine which parameters can be removed; or you could remove uncessary parameters for your users. Be careful that you only remove parameters which do not matter. Here's an example of a URL with a couple of parameters:
May 16 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: techy techno | last post by:
Hiii Hello.. I just wanted to know if anyone can tell me how can I give my website visitors the feature of "FRIENDLY PRINTING" through IE. I would definitely like to give a feature like...
7
by: Paul | last post by:
I thought this is more of an IE issue but i've had no joy on that group perhaps somebody here will have a clue. If i click a link to a web page embedded in Excel (97 OR 2000) i get the standard...
4
by: ST | last post by:
Hi, I'm implementing a printer friendly feature for all the pages on a web site. I'm separating the header, content, and footer into separate ascx files, which are contained in the main file. ...
4
by: Matt Mercer | last post by:
Hi, I have a asp .net/VB web app that does the typical submitting and retrieving from a SQL database. I am lost as to how I should create a print friendly page for the data. Here is the...
1
by: dinoo | last post by:
Can any one help me out? I am looking out to implement printer friendly version of a web page. I do not want the header and footer show up in the print and I do not want to use frames (it is a...
5
by: weetat.yeo | last post by:
Hi all , I have php page which the data in the page are extracted from MYSQL database. The data are retrieved when user click submit button . In the php page , there is a print button for user...
2
by: flickle1 | last post by:
Hi, I created a website in PHP www.poundsback.com and i want to know how to make Friendly URL's if you browse the website you will see that some of the urls are quite long in size. I heard...
1
by: Dave Rado | last post by:
Hi A while ago I discovered a way of creating css pseudo-frames, that offer users the important benefits of real frames (i.e. the navigation remains visible when you scroll down the page), but...
15
by: Prisoner at War | last post by:
Okay, I'd like to create a print-friendly website, so I've been reading up on how to create print-friendly pages (without duplicating my site, of course, by having separate versions of each...
5
by: Max2006 | last post by:
Hi, I have a TreeView and this is my node style: <asp:TreeNodeStyle ForeColor = "#000000" Font-Size="9px" Font-Bold="false" Width="100px" NodeSpacing="3px" /> The problem is the expand...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.