| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
I admire kayla
On a golden path...
Joined in Aug 2003
Lives in Saint Petersburg, Florida
Hosted on VPS5
478 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
|
This is a quick tutorial on how to hide your php pages.
First: Open up your favorite editor. Let's say I have five pages: Main, Portfolio, About Me, Links, Contact Me Let's start. First, before all you will need this: PHP Code:
The main page would be something like this: PHP Code:
It should Look something like this: PHP Code:
You will now need to close it up, by doing this: PHP Code:
PHP Code:
Now all of your pages would be something like this: http://demo.com/?act=portfolio http://demo.com/?act=contact http://demo.com/?act= http://demo.com/?act=links Here it goes, any questions or messups, reply ![]()
__________________
“The object of war is not to die for your country, but to make some other bastard die for his.” -George Patton VPS5 |
|
|
|
|
|
#2 (permalink) |
|
Caffeine fiend
Comfy Contributor
Joined in Aug 2004
Lives in Reston, Virginia
Hosted on pass15
270 posts
Gave thanks: 0
Thanked 0 times
|
If you want to be really devious about it, you can use mod_rewrite and set flat URLs like:
http://demo.com/portfolio goes to http://demo.com/?act=portfolio http://demo.com/contact goes to http://demo.com/?act=contact http://demo.com/links goes to http://demo.com/?act=links |
|
|
|
|
|
#3 (permalink) |
|
Web Hosting Super Ninj4
Super #1
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
|
For those wondering, this would produce an effect like SurpassHosting.com uses with the top navigation links.
Also, allow me to correct a few things in the code. The final version had some things left out. PHP Code:
|
|
|
|
|
|
#4 (permalink) |
|
I admire kayla
On a golden path...
Joined in Aug 2003
Lives in Saint Petersburg, Florida
Hosted on VPS5
478 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
|
woops, mybad
__________________
“The object of war is not to die for your country, but to make some other bastard die for his.” -George Patton VPS5 |
|
|
|
|
|
#5 (permalink) |
|
L'Awesome Advocate
Super #1
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
|
How would you go about using mod_rewrite to change the links? I just don't know how to produce the coding to do so.
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.
|
|
|
|
|
|
#6 (permalink) |
|
Peaches!
Excelling Contributor
Joined in Jul 2003
Lives in Ottawa, Ontario, Canada
Hosted on Jose, Pass19
564 posts
Gave thanks: 0
Thanked 0 times
|
This should work:
Code:
RewriteEngine on RewriteBase / RewriteRule ^(.*)[^/]$ index.php?page=$1 [T=application/x-httpd-php] |
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
On a golden path...
Joined in Jul 2004
372 posts
Gave thanks: 0
Thanked 0 times
|
think this is a stupid question....but why would someone want to hide their php pages?
__________________
"I am one of the few honest people that I have ever known” ~~Nick, Great Gatsby --- Don't ever argue with idiots. They drag you down to their level and beat you with experience. |
|
|
|
|
|
#8 (permalink) |
|
I admire kayla
On a golden path...
Joined in Aug 2003
Lives in Saint Petersburg, Florida
Hosted on VPS5
478 posts
Gave thanks: 1
Thanked 1 Time in 1 Post
|
Looks professional.
__________________
“The object of war is not to die for your country, but to make some other bastard die for his.” -George Patton VPS5 |
|
|
|
|
|
#9 (permalink) | |
|
Web Hosting Super Ninj4
Super #1
Joined in Sep 2003
Lives in Fullerton, CA
1,581 posts
Gave thanks: 0
Thanked 2 times
|
Quote:
|
|
|
|
|