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
Changing filesystem to file.php?name=mypage
Old 09-25-2010, 10:47 PM Changing filesystem to file.php?name=mypage
Skilled Talker

Posts: 56
Trades: 0
I'm thinking of changing my websites filesystem to using one page for most of the pages. all i will have to do is get the title from the url and with that the page will gather everything it needs but it would use the same basic outline per page. I'm switching from html to php so it would look like this.
Url now: /my_page.html
New Url: /page.php?title=my page
Do you guys think this would be a good or bad idea?
Also how would this impact site crawlers would they crawl the variable in the url or just the page.php?
My other alternative is to make a .php page for every file as i have done before with html and write the variable into a blank page then use php include to include page.php.

What do you guys think is best and why?
Thanks alot guys. I'm kinda new to php but i'm slowly learning how amazing and great it is.
__________________

Please login or register to view this content. Registration is FREE
Free Online Games
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
 
Register now for full access!
Old 09-25-2010, 11:14 PM Re: Changing filesystem to file.php?name=mypage
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
Use the URL: /my_page

Then use .htaccess to rewrite that to /page.php?title=my_page

Then use that to load my_page.php from outside your webroot.

This way, my_page.php is never directly accessible via web, adding security to your app.

You can also in the future add functionality to load pages from the database instead of from a path.
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Old 09-25-2010, 11:26 PM Re: Changing filesystem to file.php?name=mypage
Skilled Talker

Posts: 56
Trades: 0
Sorry I've only really used .htaccess before other then making the not found page so what would i have to put in the .htaccess to do that?
__________________

Please login or register to view this content. Registration is FREE
Free Online Games
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
Old 09-26-2010, 05:11 PM Re: Changing filesystem to file.php?name=mypage
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
Rather than asking me to do your work for you, why not proactively research the suggestions I made and learn how to manipulate htacess files?
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Old 09-26-2010, 11:08 PM Re: Changing filesystem to file.php?name=mypage
Skilled Talker

Posts: 56
Trades: 0
because i can't find anything to do what you described.
__________________

Please login or register to view this content. Registration is FREE
Free Online Games
pcmaster160 is offline
Reply With Quote
View Public Profile Visit pcmaster160's homepage!
 
Reply     « Reply to Changing filesystem to file.php?name=mypage
 

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.22037 seconds with 12 queries