|
-
Oct 23rd, 2011, 09:37 AM
#1
[RESOLVED] Some doubts regarding URL rewrite
Hi 
I have been going through certain tutorial for some hours now, to know more about URL rewriting.
But I have a doubt:
If my site is kind of displaying articles, a sample link could be:
Code:
http://www.mysite.com/my-article-name-123
Where, 123 is the article id and the rest of the string is the article title. If a user types this address on his/her browser, we could easily match the last article id using regular expression(in Rewrite rules).
So the rewrited URL might look something like this:
Code:
http://www.mysite.com/showarticle.php?id=123
But how would we give this link. I mean, this link should be coming from somewhere. That is how this link will be created ?
If I'm not using the URL rewriting, I would use the address:
Code:
http://www.mysite.com/showarticle.php?id=123
for hyperlinks displayed in my site.
Eg:
Code:
<html>
<body>
<a href="http://www.mysite.com/showarticle.php?id=123">My First Article </a>
</body>
</html>
But in the case of URLs with article_names, how will I do it ? 
Thanks in advance
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|