NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Question with mod rewrite

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-28-2005, 05:00 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



Question with mod rewrite


The url to games on my website looks something like this:

http://www.gameworldx.com/gameinfo.php?gameid=X

X could be any number from 1 to around 650.

I want to change the URL to something like this:

http://www.gameworldx.com/game_X.htm

Now, I know how to do that, however there are numerous people linking to my games the dynamic way, is there any way that I can redirect the page so users that type in http://www.gameworldx.com/gameinfo.php?gameid=X are redirected to http://www.gameworldx.com/game_X.htm ??
????: NamePros.com http://www.namepros.com/programming/102585-question-with-mod-rewrite.html

Thanks in advance,
Joe
__________________
Joe
gamex is offline  
Old 06-28-2005, 06:55 PM   #2 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
Wildchild22 is an unknown quantity at this point
 



you could use a meta refresh and inform the user that the URL has changed and they will be redirected in 3 seconds or something similar?
Wildchild22 is offline  
Old 06-28-2005, 07:05 PM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



But wouldnt a meta refresh show up no matter what the url is. right? So i would be lie an infinite loop
__________________
Joe
gamex is offline  
Old 06-28-2005, 07:12 PM   #4 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
Wildchild22 is an unknown quantity at this point
 



on the php?gameid=

you use
<META http-equiv=Refresh CONTENT="5; URL=game_X.htm">



i may be wrong and i may've totally understood your question, im kinda tired
Wildchild22 is offline  
Old 06-28-2005, 07:31 PM THREAD STARTER               #5 (permalink)
NamePros Regular
Join Date: Feb 2004
Location: Student @ UConn
Posts: 411
gamex has a spectacular aura aboutgamex has a spectacular aura about
 



yea. but the code on both pages is identical, so even if they ere on the page game_X.htm, wont keep redirecting to the same page?
__________________
Joe
gamex is offline  
Old 06-28-2005, 07:36 PM   #6 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
Wildchild22 is an unknown quantity at this point
 



ah right...
im not too sure exactly but i think i once pulled off something similar with something like

<Iframe Src="game.php"></Iframe>

i can't remember exactly how i did it........... or you could empty the php page and use an include?




im sorry i'm not much help
Last edited by Wildchild22; 06-28-2005 at 07:43 PM.
Wildchild22 is offline  
Old 06-29-2005, 06:07 AM   #7 (permalink)
Pro Coder & Designer
 
aween's Avatar
Join Date: Apr 2005
Location: Netherlands
Posts: 967
aween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really nice
 



well what you could do is this:

copy the file gameinfo.php and rename it to ginfo.php make a mod_rewite line for that to make it game_1.html as example.

????: NamePros.com http://www.namepros.com/showthread.php?t=102585
with gameinfo.php you will delete the content and only write some php code to redirect it. example:

guy1 goes to www.domain/gameinfo.php?id=1

in the source it will look like this:

Code:
<META http-equiv=Refresh CONTENT="5; URL=game_<? echo $id; ?>.html">
once they enter id=1 . it will redirect after 5 seconds to game_1.html


Hope this clears it up you.


X
__________________
aween web development
aween is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not at trick question Coastalguy The Break Room 5 05-04-2005 05:22 PM
phpbb mod instlation help needed ill pay 20$ a mod jamieneil Website Development 6 05-02-2005 08:17 AM
mod rewrite dotcommakers Website Development 2 01-22-2005 11:05 PM
little question.. khkhan Domain Appraisals 2 11-20-2004 05:28 AM
How to MOD PhpBB on PhpNuke? drmaximus Website Development 8 10-12-2004 03:10 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:15 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger