|
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
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!
|
|
|
|
Joined: Oct 2000
Posts: 60
Power User
|
Power User
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
|
|
|
|
Joined: Mar 2000
Posts: 84
Member
|
Member
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
|
|
|
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
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
Joined: Aug 2000
Posts: 3,590 |
I don't plan on changing the .htaccess files...I am currently looking at other options....
|
|
|
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
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
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
Joined: Aug 2000
Posts: 3,590 |
I don't mind having the files parsed...they're already shtml files.
|
|
|
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.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|