HostingPoint
09-01-2005, 12:04 PM
Hey guys, I have alot of pages on my site that are dynamic, so the urls are like: content.php?text=3443
How Can I get it to make the url dynamically like:
TEXT_ON_PAGE.HTML - and the name is dynamically generated.
Kinda like VBSEO used on DNF?
innova
09-01-2005, 04:21 PM
How about this:
www.yourdomain.com/content.php/text/3443
There was a recent example here. Use the search func.
sea otter
09-02-2005, 11:54 PM
Go to the mod_rewrite forum (http://forum.modrewrite.com/). This has been covered there many many times.
mwaseem
09-05-2005, 02:46 PM
Here is a mod_rewrite tutorial for vBulletin 3.0.7 (http://www.daniweb.com/tutorials/tutorial22840.html).
I'm running NashaBuzz.Com (http://www.nashabuzz.com/forum/) using this mod_rewrite approach :)
TonyB
09-06-2005, 07:15 PM
Originally posted by mwaseem
Here is a mod_rewrite tutorial for vBulletin 3.0.7 (http://www.daniweb.com/tutorials/tutorial22840.html).
I'm running NashaBuzz.Com (http://www.nashabuzz.com/forum/) using this mod_rewrite approach :)
Yeah that's a great tutorial used it on my forum http://random-forums.com/
As for the question at hand my regex and mod_rewrite isn't great so don't freak out if I'm wrong but this is what I think you'd use for content.php?text=3443 and turn it into something .html
Here's the .htaccess file
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^page([0-9]+).html$ content.php?text=$1 [L]
Hope that helps if that's wrong someone feel free to correct me
WO-Jacob
09-06-2005, 08:37 PM
You would want to technicall use ^page([0-9]+)\.html$ ... the \. is forcing a . instead of "anything" which is the regexp meaning of .
topsub
09-07-2005, 02:37 PM
What about the explode function with php?
something like:
$variables = explode("/",$_SERVER['REQUEST_URI']);
that will break down the url and you can use switch or else if statements to include the right pages
domain.com/site/home
domain.com/site/contact
stuff like that