Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

SEO friendly urls

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
joomla
Asked:
joomla
  • 2
  • 2
  • 2
  • +1
1 Solution
 
joomlaAuthor Commented:
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
 
p_nutsCommented:
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
 
mattibuttCommented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
landalfCommented:
Hi,
Have you tried in the backend site/global configuraton/ ?  in site SEO settings

There you can do magic

0
 
p_nutsCommented:
@joomla
with a name like that assuming you're using joomla isn't that strange...

any luck?
0
 
joomlaAuthor Commented:
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
 
landalfCommented:

Brilliant ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now