|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dynamic to static URL re-writing question...
bit of advice needed... (i think i know what im talking about here but mighnt)
the site we're having made for us uses database information for new pages created using a content management system at the administration end... at the moment, this means pages come out with a lot of dynamic parameters...(i cant recreate the url i mean as im a new user account....) design company is in the process of sorting out a way of making these static urls for search engine/usability... how long does this usually take??? what can be used to do it??? does anyone know??? cheers! David |
|
#2
|
|||
|
|||
|
There are various approaches to rewriting URLs. the quick and easy method is to take the existing page title, turn it into a url friendly string (remove special characters, replace spaces with hyphens, lower case it, remove short words, etc) and place it into the URL together with the page id number from the database, eg
Title: An Example Page Title | Page Id #: 25 Existing URL: /page.php?pageID=25 gives: /example-page-title-25.html your .htaccess rewrite rule would then be something like: RewriteRule ^(.+)-(0-9+).html$ page.php?pageID=$2 NB, you'd also want to implement a method whereby the text string is checked, otherwise you could replace it with anything and still pull the same page using the id#. To give you more control over the URLs, you can add an additional indexed field into the database to store a URL "slug". Instead of querying the database for the page id# you can then query it for the url slug instead. Example url: /example-page-title.html .htaccess: RewriteRule ^(.+).html$ page.php?urlSlug=$1 These examples assume you're using an Apache server with mod_rewrite enabled. It's possible to achieve url rewriting on Windows by using something like ISAPI Rewrite, but I have no personal experience with that so I can't give examples. As to how long it would take to put URL rewriting in place depends on the CMS you're using, and which method you want to implement. For the more simple version above it could be achieved in ~15 minutes if the developer has previous experience with the CMS. There are plenty of tutorials available for rewriting urls, so I'd suggest looking into it in more depth. The examples above are just a quick introduction. |
|
#3
|
|||
|
|||
|
Thanks for sharing this information. I really needed it
|
![]() |
| Viewing: SEO Chat Forums > Other > SEO Scripts > Dynamic to static URL re-writing question... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|