Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
including file attached with id
Old 04-18-2007, 03:19 PM including file attached with id
Average Talker

Posts: 23
Name: WHYY
Trades: 0
hi,
I want to write a very little "contact.php" file so that it includes
"index.php?id=contact".

Please let me make my words clearer:

Internet user will type www.sitename.com/contact.php in the address line in his browser, and then the page will be loaded as "index.php?id=contact".

However, it's desired that internet user never encounters with such an address: www.sitename.com/index.php?id=contact although index.php that takes an id, is included in the contact.php.

before answering, please be sure that you got me correctly, thanks...
phpost is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-18-2007, 06:36 PM Re: including file attached with id
Mattmaul1992's Avatar
Ultra Talker

Posts: 486
Name: Matt
Trades: -1
You have a few options. You can use a frame so all anyone would ever see is www.sitename.com but that is bad for search engine optimization (so you can get a higher rank in Google, Dogpile, Yahoo!, etc.) so you can also require the file by using require('page.php'); or require_once('page.php'), etc. How do you specify which file to require? Save this information in a session or cookie. I would recommend using a cookie because required files generate new session ID's. It depends how you write your script if that would be a problem or not. If you're not worrying about SEO (Search Engine Optimization) I say use a frame.
__________________
PHP Code:
$talkupation++; 

Please login or register to view this content. Registration is FREE
- Free IPB forum hosting (releasing today!!!), no ads, free modifications
Mattmaul1992 is offline
Reply With Quote
View Public Profile
 
Old 04-18-2007, 09:58 PM Re: including file attached with id
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Take a look at Apache RewriteEngine for htaccess url rewrite.

http://www.yourhtmlsource.com/sitema...rewriting.html
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 04-19-2007, 02:26 AM Re: including file attached with id
Average Talker

Posts: 23
Name: WHYY
Trades: 0
Thanks mgraphic and Mattmaul1992 for replies.

mgraphic, I suppose the link you posted concerns and handles my problem,
thanks again...
phpost is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to including file attached with id
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13844 seconds with 12 queries