Previous Thread
Next Thread
Print Thread
Rate Thread
#205720 10/19/2000 9:21 AM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Is it possible to use an SSI to include a PHP script, while that PHP script has a header() command in it? Is there any way to avoid changing the HTML file extension and still be able to redirect the user to another page, securely, without them ever seeing the HTML file? HELP!


Sponsored Links
Joined: Oct 2000
Posts: 60
Power User
Power User
Offline
Joined: Oct 2000
Posts: 60
I don't believe this will work, because the headers have already been sent with the first document. There is a chance if it's the very first line of the document, but you'd almost have to experiment to see if it works.

Administrator, Videogame Music Archive

Bommer #205722 10/19/2000 3:01 PM
Joined: Mar 2000
Posts: 84
Member
Member
Offline
Joined: Mar 2000
Posts: 84
By using .htaccess overrides, you can set it so your .html are parsed as PHP files, thereby allowing you to put PHP code in your files without having to change the extensions to ,php, .phtml, .php3 or whatever your system requires.

---------
Shalazar
http://www.charisma-carpenter.com

G5 #205723 10/20/2000 3:34 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Be careful with this though if you have anything that saves to HTML files in your file area as this means folks can run their own PHP commands. Likely culprits are simply guestbooks or discussion forums. This is not as bad if you have control over your entire site but if not, if anyone can get access to a file in your account you are potentially owned (to a degree anyways).

Cheers



Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I don't plan on changing the .htaccess files...I am currently looking at other options....


Sponsored Links
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
From what your asking and looking to do and that you don't want html files parsed I personally don't see a way to do this. I could be wrong though.


Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Though you could use the JS replace() function so they couldn't hit Back and get to that page that you don't want them to see. But they'd still see it the first time it loads up.


Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I don't mind having the files parsed...they're already shtml files.



Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)