HighDots Forums  

OT: Executing PHP code in a .htm(l) file

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss OT: Executing PHP code in a .htm(l) file in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Walt F. Schaefer
 
Posts: n/a

Default OT: Executing PHP code in a .htm(l) file - 07-14-2008 , 03:12 PM






This is a conundrum. I have pages I need to permanently redirect, preferably
using a 301 redirect. My host (Crystal Tech) does not allow 301s via
..htaccess. They do allow 301s via script code (PHP, ASP or ColdFusion) in
the document's head. For example if I have a page named waltspage.htm and I
want to redirect it to waltsNEWpage.html I would add this code in the head
section of waltspage.htm:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.waltswebworx.com/waltsNEWpage.html" );
?>

Here's the problem, seemingly a Catch22, I have to leave the filename of the
original file as waltspage.htm so it will be found. But if I leave it as is
I don't think the PHP code will execute, will it? Don't I have to change the
name to waltspage.PHP? And if I do that it won't be found under the actual
URL of http://www.waltswebworx.com/waltspage.htm

I contacted Crystal Tech's usually stellar tech support. They choked
completely with the tech at some point rambling on about using C++ in web
pages.

What is the answer?

Thanks

--

Walt




Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 03:59 PM






Quote:
What is the answer?
Get a new web host? ;o)

Will Crystal tech allow .html files to be processed by PHP? That'd be a
site/server setting. If they do, then that's the solution. If not, I think
you are correct, you're stuck in a catch-22.

-Darrel




Reply With Quote
  #3  
Old   
Walt F. Schaefer
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 04:22 PM



Yup! That's the answer. CT is Windows/IIS based and I don't have direct
access to the IIS Control Panel. I just finished a 29 minute tech support
call with them and they set up .htm & .html to be parsed for PHP code.

What a pain! Yes, I have considered a new host but I have 19 sites with CT
and the thought of migrating all of them is enough to keep me up nights.

Thanks Darrel

--

Walt


"darrel" <notreal (AT) nowhere (DOT) com> wrote

Quote:
What is the answer?

Get a new web host? ;o)

Will Crystal tech allow .html files to be processed by PHP? That'd be a
site/server setting. If they do, then that's the solution. If not, I think
you are correct, you're stuck in a catch-22.

-Darrel




Reply With Quote
  #4  
Old   
Mad Dog
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 04:39 PM



Walt F. Schaefer wrote:
Quote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29 minute
tech support call with them and they set up .htm & .html to be parsed
for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep me
up nights.
What Control Panel do they use? I did a big migration a year or so ago and
going from CPanel to Cpanel was pretty darned easy and painless. Nail
biting, but easy and painless. (:})

MD




Reply With Quote
  #5  
Old   
Walt F. Schaefer
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:09 PM



I was referring to the control panel for the IIS which clients don't have
access to. I was able to get .htm & .html files set to process as PHP but I
had to do it via a support ticket. No big deal except that CT doesn't have
docs to explain it.

What control panel do they use. Don't know; don't care. :-)

--

Walt


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote

Quote:
Walt F. Schaefer wrote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29 minute
tech support call with them and they set up .htm & .html to be parsed
for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep me
up nights.

What Control Panel do they use? I did a big migration a year or so ago and
going from CPanel to Cpanel was pretty darned easy and painless. Nail
biting, but easy and painless. (:})

MD




Reply With Quote
  #6  
Old   
Mad Dog
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:14 PM



Understood. I was responding to your comment about the pain of migrating 19
sites to another site host.

MD


Walt F. Schaefer wrote:
Quote:
I was referring to the control panel for the IIS which clients don't
have access to. I was able to get .htm & .html files set to process
as PHP but I had to do it via a support ticket. No big deal except
that CT doesn't have docs to explain it.

What control panel do they use. Don't know; don't care. :-)


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gdha$j8o$1 (AT) forums (DOT) macromedia.com...
Walt F. Schaefer wrote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29 minute
tech support call with them and they set up .htm & .html to be
parsed for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep
me up nights.

What Control Panel do they use? I did a big migration a year or so
ago and going from CPanel to Cpanel was pretty darned easy and
painless. Nail biting, but easy and painless. (:})

MD



Reply With Quote
  #7  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:16 PM



Don't have to migrate all of them, you know?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Walt F. Schaefer" <walt (AT) waltswebworx (DOT) com> wrote

Quote:
Yup! That's the answer. CT is Windows/IIS based and I don't have direct
access to the IIS Control Panel. I just finished a 29 minute tech support
call with them and they set up .htm & .html to be parsed for PHP code.

What a pain! Yes, I have considered a new host but I have 19 sites with CT
and the thought of migrating all of them is enough to keep me up nights.

Thanks Darrel

--

Walt


"darrel" <notreal (AT) nowhere (DOT) com> wrote in message
news:g5gb7c$gqj$1 (AT) forums (DOT) macromedia.com...
What is the answer?

Get a new web host? ;o)

Will Crystal tech allow .html files to be processed by PHP? That'd be a
site/server setting. If they do, then that's the solution. If not, I
think you are correct, you're stuck in a catch-22.

-Darrel





Reply With Quote
  #8  
Old   
Walt F. Schaefer
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:36 PM



Aha! I see that now. I guess the main thing I dread is changing all the
emails and then forcing my clients to change their email login detail for
Outlook or whatever email client they use.

--

Walt


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote

Quote:
Understood. I was responding to your comment about the pain of migrating
19 sites to another site host.

MD


Walt F. Schaefer wrote:
I was referring to the control panel for the IIS which clients don't
have access to. I was able to get .htm & .html files set to process
as PHP but I had to do it via a support ticket. No big deal except
that CT doesn't have docs to explain it.

What control panel do they use. Don't know; don't care. :-)


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gdha$j8o$1 (AT) forums (DOT) macromedia.com...
Walt F. Schaefer wrote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29 minute
tech support call with them and they set up .htm & .html to be
parsed for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep
me up nights.

What Control Panel do they use? I did a big migration a year or so
ago and going from CPanel to Cpanel was pretty darned easy and
painless. Nail biting, but easy and painless. (:})

MD





Reply With Quote
  #9  
Old   
Mad Dog
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:39 PM



You shouldn't have to do that either. If the domain name is the same, use
the same login and passwords on the new site and they won't know the
difference. The only messy part is watching the propagation and making sure
no emails slip through to the old account during the brief transition.

But that's all easy for me to say....I don't plan on doing it again anytime
soon!

MD

Walt F. Schaefer wrote:
Quote:
Aha! I see that now. I guess the main thing I dread is changing all
the emails and then forcing my clients to change their email login
detail for Outlook or whatever email client they use.


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gfk2$lag$1 (AT) forums (DOT) macromedia.com...
Understood. I was responding to your comment about the pain of
migrating 19 sites to another site host.

MD


Walt F. Schaefer wrote:
I was referring to the control panel for the IIS which clients don't
have access to. I was able to get .htm & .html files set to process
as PHP but I had to do it via a support ticket. No big deal except
that CT doesn't have docs to explain it.

What control panel do they use. Don't know; don't care. :-)


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gdha$j8o$1 (AT) forums (DOT) macromedia.com...
Walt F. Schaefer wrote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29
minute tech support call with them and they set up .htm & .html
to be parsed for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep
me up nights.

What Control Panel do they use? I did a big migration a year or so
ago and going from CPanel to Cpanel was pretty darned easy and
painless. Nail biting, but easy and painless. (:})

MD



Reply With Quote
  #10  
Old   
Walt F. Schaefer
 
Posts: n/a

Default Re: Executing PHP code in a .htm(l) file - 07-14-2008 , 05:42 PM



How about the POP3 & SMTP settings?

--

Walt


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote

Quote:
You shouldn't have to do that either. If the domain name is the same, use
the same login and passwords on the new site and they won't know the
difference. The only messy part is watching the propagation and making
sure no emails slip through to the old account during the brief
transition.

But that's all easy for me to say....I don't plan on doing it again
anytime soon!

MD

Walt F. Schaefer wrote:
Aha! I see that now. I guess the main thing I dread is changing all
the emails and then forcing my clients to change their email login
detail for Outlook or whatever email client they use.


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gfk2$lag$1 (AT) forums (DOT) macromedia.com...
Understood. I was responding to your comment about the pain of
migrating 19 sites to another site host.

MD


Walt F. Schaefer wrote:
I was referring to the control panel for the IIS which clients don't
have access to. I was able to get .htm & .html files set to process
as PHP but I had to do it via a support ticket. No big deal except
that CT doesn't have docs to explain it.

What control panel do they use. Don't know; don't care. :-)


"Mad Dog" <md (AT) maddogproductions-remove (DOT) com> wrote in message
news:g5gdha$j8o$1 (AT) forums (DOT) macromedia.com...
Walt F. Schaefer wrote:
Yup! That's the answer. CT is Windows/IIS based and I don't have
direct access to the IIS Control Panel. I just finished a 29
minute tech support call with them and they set up .htm & .html
to be parsed for PHP code.
What a pain! Yes, I have considered a new host but I have 19 sites
with CT and the thought of migrating all of them is enough to keep
me up nights.

What Control Panel do they use? I did a big migration a year or so
ago and going from CPanel to Cpanel was pretty darned easy and
painless. Nail biting, but easy and painless. (:})

MD





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.