Solved

SEO friendly urls

Posted on 2010-09-02
7
317 Views
Last Modified: 2013-12-13
I have a custom built PHP/MYSQL based CMS
Using .htaccess I can create short urls
ie
www.mysite.com/index.php?p=page&id=2 is converted to www.mysite.com/page/2

I want the url to read www.mysite.com/page/article_name.html
where article_name is a the title of the article stored in the database.

Joomla has a plugin to do this.
thanks
Michael
0
Comment
Question by:joomla
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

by:joomla
ID: 33592107
I must point out i'm not using joomla.
I simply want to replicate the joomla plugin that allows you to have friendly names
0
 
LVL 13

Accepted Solution

by:
p_nuts earned 500 total points
ID: 33592771
if you change the url from page to article its really easy

.htaccess rewrites anything that starts with article to article.php&a=%1

then in article you strip the .html

like str_replace
$ARTICLE =('.html','',$_REQUEST['1']);

etc...
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 33594481
Hi
You need to configure your application to meet your requirements short url are done using cobmination of tewchnique some hard code and using apache rewrite module
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Expert Comment

by:landalf
ID: 33602846
Hi,
Have you tried in the backend site/global configuraton/ ?  in site SEO settings

There you can do magic

0
 
LVL 13

Expert Comment

by:p_nuts
ID: 33603262
@joomla
with a name like that assuming you're using joomla isn't that strange...

any luck?
0
 

Author Closing Comment

by:joomla
ID: 33609132
I have applied your solution
I had blinkers on and was presuming I had to work with the page number (which is based on it's record number)

Rather easy once someone points the way
thanks
0
 

Expert Comment

by:landalf
ID: 33610179

Brilliant ;)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now