?
Solved

SEO friendly urls

Posted on 2010-09-02
7
Medium Priority
?
327 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 2000 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

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…
Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

764 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