Solved

SEO friendly urls

Posted on 2010-09-02
7
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With more and more people tethered to the internet, advertisers can reach you in new and creative ways. Push notifications on your smartphone, customized advertisements based on your previous searches, and email inboxes filled with promotional pitch…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
The viewer will learn how to dynamically set the form action using jQuery.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

740 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