Jump to content

dynamic SEF urls php/mysql help


cindreta

Recommended Posts

Hi, please just don't tell me to use htaccess only with sef urls, i have been trying to solve this myself. Basicly my question is i have a cms and i wanna make seo friendly urls

from this: site.com.news.php?id=55 to per say site.com/news/some-news-title

 

if i got the idea right i would have to generate a sef url for every article and store it to mysql, and then do i have to change my queries(since i want titles and not id's in url) to be look something like this:

select stuffhere from table where sefurl=$_GET[sefurl]

is this how it works? i mean is this going to be slower then getting it by id? is there a way to still have id's in a mysql query an have titles in sef urls??

 

please i really need somebody to explain or show, its driving me crazy :(

 

Link to comment
Share on other sites

There are several different ways of doing it. Alot of sites that use 'pretty-urls' don't actually use the title part, they ignore it, but have the id stored in the URL too.

 

What exactly do you mean by...

 

Hi, please just don't tell me to use htaccess only with sef urls,

 

To my knowledge you can't do this without using .htaccess files (at least on an Apache server, no doubt IIS and other hosting options have differen't methods).

Link to comment
Share on other sites

by that i ment i know i have to at the end go and make an htaccess file but i did not manage to do what i described in the post with htaccess only...

 

well please tell me how it's done, or show me an example since you already know, i am very interested in keeping my query id's and still haveing the title in the url.

 

can you show examples, code, web site tutorials or something?

(ps. i searched google and there are mainly htaccess tutorials only?

 

thank you

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.