Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Mod Rewrite - Incorporate Headine in URL

     
3:14 pm on Mar 10, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Feb 13, 2003
posts:220
votes: 0


Hi

Just wondering how you go about incorporating the name of a headline into a URL?

As an example:

FROM:

[domain.com...]

TO:

[domain.com...]

'13016370' is the ID number from the DB so essentially you just select the news heading from the DB according to item number.

Any ideas?

Many Thanks.

Woldie.

6:47 pm on Mar 10, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Actually, the script that builds the links on your pages needs to insert the headline, and then you could use mod_rewrite to remove it so that the script is called with the proper article number. But then, you have the problem of "associating" the headline with the correct article number when the headline URL is requested. You can do this using RewriteMap if you have htppd.conf access, but RewriteMap is not available in .htaccess.

If you're stuck with .htaccess, then have your page-builder create links like

/news/13016370/some_headliner_goes_here.html

and then use mod_rewrite to strip off the unneeded headline if necessary.

Another alternative is to use the script to do both functions, if you can retrieve an article by headline.

Jim

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members