bugzy Posted August 18, 2012 Share Posted August 18, 2012 Hello guys need some advice on having a good url and page title for public pages. This is of course for SEO purposes. I don't want want my visitors to see a pages w/out and page tile and having a url link like www.mywebsite.com?id=123232323 I wonder if I needed to put another column on the table that will serve as the title or just use the page name column and category name column? I wonder how you guys doing it? any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/ Share on other sites More sharing options...
spiderwell Posted August 18, 2012 Share Posted August 18, 2012 page name works but certain characters might mess things up, so a page name might be johnny's gallery you want to have another colum called pagelink (or whatever you want to call it) and replace out the characters to become johnnys_gallery Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/#findComment-1370448 Share on other sites More sharing options...
MMDE Posted August 18, 2012 Share Posted August 18, 2012 page name works but certain characters might mess things up, so a page name might be johnny's gallery you want to have another colum called pagelink (or whatever you want to call it) and replace out the characters to become johnnys_gallery Also remember to escape that ' in johnny's gallery. Also remember to make sure no two links are the same, so add a random number at the end if a link already exists, and make sure that one doesn't exist too etc. Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/#findComment-1370454 Share on other sites More sharing options...
teng84 Posted August 19, 2012 Share Posted August 19, 2012 you simply make the title seo friendly so you dont have to worry about adding additional fields Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/#findComment-1370630 Share on other sites More sharing options...
bugzy Posted August 19, 2012 Author Share Posted August 19, 2012 you simply make the title seo friendly so you dont have to worry about adding additional fields Problem is where will I get those that I will put on the title if I will not add another fields? Aside of course from the domain itself. As much as possible I want php to handle the title.. Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/#findComment-1370702 Share on other sites More sharing options...
spiderwell Posted August 20, 2012 Share Posted August 20, 2012 if you use php to change the page title to a url safe equivilent, you will need to store is somewhere or how else will you look it up?, you cannot second guess where you have removed apostrophe from in a page title to make it url safe. you need an extra column in the database, also also need to check on insert/update that it is unique, so that you dont get 2 pages with the same url Quote Link to comment https://forums.phpfreaks.com/topic/267259-need-advice-on-having-a-good-url-and-page-title/#findComment-1370781 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.