Solved

SEO friendly urls

Posted on 2010-09-02
7
326 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
The viewer will learn how to count occurrences of each item in an array.
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.

729 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