[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 06-28-2005, 04:00 PM   #1 (permalink)
NamePros Regular
 
gamex's Avatar
 
Join Date: Feb 2004
Location: Student @ UConn
Posts: 408
73.95 NP$ (Donate)

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 ??

Thanks in advance,
Joe
__________________
Joe
CarrotCash.com
gamex is offline  
Old 06-28-2005, 05:55 PM   #2 (permalink)
NamePros Regular
 
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
93.00 NP$ (Donate)

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, 06:05 PM   #3 (permalink)
NamePros Regular
 
gamex's Avatar
 
Join Date: Feb 2004
Location: Student @ UConn
Posts: 408
73.95 NP$ (Donate)

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
CarrotCash.com
gamex is offline  
Old 06-28-2005, 06:12 PM   #4 (permalink)
NamePros Regular
 
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
93.00 NP$ (Donate)

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, 06:31 PM   #5 (permalink)
NamePros Regular
 
gamex's Avatar
 
Join Date: Feb 2004
Location: Student @ UConn
Posts: 408
73.95 NP$ (Donate)

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
CarrotCash.com
gamex is offline  
Old 06-28-2005, 06:36 PM   #6 (permalink)
NamePros Regular
 
Join Date: Jun 2005
Location: S. Yorkshire, United Kingdom
Posts: 310
93.00 NP$ (Donate)

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 06:43 PM.
Wildchild22 is offline  
Old 06-29-2005, 05:07 AM   #7 (permalink)
Pro Coder & Designer
 
xlusive's Avatar
 
Join Date: Apr 2005
Location: Netherlands
Posts: 964
101.50 NP$ (Donate)

xlusive is just really nicexlusive is just really nicexlusive is just really nicexlusive is just really nicexlusive 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.

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
__________________
Online Dragonball Game
xlusive is offline  
Closed Thread


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:03 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85