Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

.htaccess question

 
Goto page 1, 2
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  Can IIS FTP over HTTP/HTTPS?  
Author Message
gfy

External


Since: Mar 08, 2004
Posts: 33



(Msg. 1) Posted: Wed Feb 23, 2005 10:40 am
Post subject: .htaccess question
Archived from groups: alt>www>webmaster (more info?)

I host a number of domains at a "well known hosting company" on
various shared hosting plans. Most of these domains are simple
static pages. Some have some dynamic content, some forms, some PHP
to process the forms.

What I want to do is to have PHP statements embedded in ordinary
..html file and have those PHP statements interpreted. Their httpd
server (apache) is configured to interpret PHP in .phtml files as
well as the obvious .php, .php4 and some others. I believe I
should be able to convince apache to interpret .html files with
PHP via some statement(s) in the .htaccess file.

My intent is to hide from visitors to the site anything suggesting
dynamic content. That is: every page seen via the location bar on
their browser should be of type .html. ... Am I being unreasonable
with this goal?

The hosting company have been either unwilling or unable to answer
a question for me. They tell me "... do this, that, or the other
thing" in .htaccess to get the results I want. Alternatively, they
tell me to use some other technique that I explicitly said I
didn't wanna do (put it in .phtml files). Their suggestions for
..htaccess simply do not work.

They have told me to add an "AddType ..." statement to the
..htaccess. It does not work. We've been going round & round for
about a week now via email (no telephone support) with no resolution.

Something tells me they don't want me doing this, or that the tech
support folks don't know how to do it. Any help in this forum
would be appreciated.

"Rex"

--
The name, "Rex Karz" is a pseudonym. The From: email address
is a spam trap. Messages sent to that address may cause the
sender's IP-address to be listed in one or more DNSBls.

 >> Stay informed about: .htaccess question 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 2) Posted: Wed Feb 23, 2005 2:09 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And lo, Rex Karz didst speak in alt.www.webmaster:

 > I believe I should be able to convince apache to interpret .html files
 > with PHP via some statement(s) in the .htaccess file.

AddType application/x-httpd-php .html

 > They have told me to add an "AddType ..." statement to the .htaccess. It
 > does not work. We've been going round & round for about a week now via
 > email (no telephone support) with no resolution.

Take an empty .htaccess file and add the following single line to it:

RedirectMatch 410 ^.*

.... and put it in your root directory. Then visit your website. If you
don't get a 410 Gone response code, your server is ignoring your .htaccess
file. Your host needs to do something about this.

If you *do* get a 410 Gone response, there is something wrong with the
syntax of whatever AddType directive you added. *You* need to do
something about this.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/ringmaker" target="_blank">http://www.greywyvern.com/ringmaker</a> - Orca Ringmaker: Host a web ring
from your website!<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: .htaccess question 
Back to top
Login to vote
gfy

External


Since: Mar 08, 2004
Posts: 33



(Msg. 3) Posted: Wed Feb 23, 2005 2:09 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:

 > And lo, Rex Karz didst speak in alt.www.webmaster:
 >
  >> I believe I should be able to convince apache to interpret .html
  >> files with PHP via some statement(s) in the .htaccess file.
 >
 >
 > AddType application/x-httpd-php .html
 >

Doesn't work.

Mozilla objects saying, in a modal dialog box: "The file ... is of
type application/x-httpd-php and Mozilla does not know how to
handle ...". MSIE says something similar.

  >> They have told me to add an "AddType ..." statement to the .htaccess.
  >> It does not work. We've been going round & round for about a week now
  >> via email (no telephone support) with no resolution.
 >
 >
 > Take an empty .htaccess file and add the following single line to it:
 >
 > RedirectMatch 410 ^.*
 >
 > ... and put it in your root directory. Then visit your website. If
 > you don't get a 410 Gone response code, your server is ignoring your
 > .htaccess file. Your host needs to do something about this.
 >

didn't do this. I have an extant .htaccess file. With the
suggested change above, it looks like this:

AddHandler server-parsed .html
AddType application/x-httpd-php .html

I know that the AddHandler statement is being parsed and acted
upon correctly.

"Rex"

--
The name, "Rex Karz" is a pseudonym. The From: email address
is a spam trap. Messages sent to that address may cause the
sender's IP-address to be listed in one or more DNSBls.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 4) Posted: Wed Feb 23, 2005 3:21 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And lo, Rex Karz didst speak in alt.www.webmaster:

 > GreyWyvern wrote:
 >
  >> And lo, Rex Karz didst speak in alt.www.webmaster:
  >>
   >>> I believe I should be able to convince apache to interpret .html
   >>> files with PHP via some statement(s) in the .htaccess file.
  >> AddType application/x-httpd-php .html
 >
 > Doesn't work.

Then you are probably running SuPHP. Try one (or both) of the following:

AddType x-httpd-php .html

AddHandler x-httpd-php .html

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/ringmaker" target="_blank">http://www.greywyvern.com/ringmaker</a> - Orca Ringmaker: Host a web ring
from your website!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
gfy

External


Since: Mar 08, 2004
Posts: 33



(Msg. 5) Posted: Wed Feb 23, 2005 3:28 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:

 > And lo, Rex Karz didst speak in alt.www.webmaster:
 >
  >> GreyWyvern wrote:
  >>
   >>> And lo, Rex Karz didst speak in alt.www.webmaster:
   >>>
   >>>> I believe I should be able to convince apache to interpret .html
   >>>> files with PHP via some statement(s) in the .htaccess file.
   >>>
   >>> AddType application/x-httpd-php .html
  >>
  >>
  >> Doesn't work.
 >
 >
 > Then you are probably running SuPHP. Try one (or both) of the following:
 >
 > AddType x-httpd-php .html
 >
 > AddHandler x-httpd-php .html
 >
 > Grey
 >

Thanks for the tip.
Still does not work.

The hosting company says they do NOT run PHP as a module, for
security reasons.

Sigh! ... I'm sure the collective wisdom of this group will
provide the answer. ... Keep the suggestions coming!

Thanks.

--
The name, "Rex Karz" is a pseudonym. The From: email address
is a spam trap. Messages sent to that address may cause the
sender's IP-address to be listed in one or more DNSBls.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
Toby Inkster

External


Since: Feb 07, 2005
Posts: 27



(Msg. 6) Posted: Wed Feb 23, 2005 3:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rex Karz wrote:

 > What I want to do is to have PHP statements embedded in ordinary
 > .html file and have those PHP statements interpreted.

This seems to work for me:

AddType application/x-httpd-php .php .php3 .phtml .html

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ <a style='text-decoration: underline;' href="http://tobyinkster.co.uk/contact" target="_blank">http://tobyinkster.co.uk/contact</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
user94

External


Since: Sep 14, 2004
Posts: 2384



(Msg. 7) Posted: Wed Feb 23, 2005 4:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rex Karz wrote

 > The name, "Rex Karz" is a pseudonym. The From: email address
 > is a spam trap. Messages sent to that address may cause the
 > sender's IP-address to be listed in one or more DNSBls.

Good for you.

--
Charles Sweeney
<a style='text-decoration: underline;' href="http://CharlesSweeney.com" target="_blank">http://CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
William Tasso

External


Since: Feb 03, 2005
Posts: 111



(Msg. 8) Posted: Wed Feb 23, 2005 8:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rex Karz wrote:
 > ...
 > Still does not work.
 >
 > The hosting company says they do NOT run PHP as a module, for security
 > reasons.
 >
 > Sigh! ... I'm sure the collective wisdom of this group will provide the
 > answer. ... Keep the suggestions coming!

New host?

--
William Tasso ------ read, read again, then post:
<a style='text-decoration: underline;' href="http://www.aww-faq.org/" target="_blank">http://www.aww-faq.org/</a>
<a style='text-decoration: underline;' href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>
<a style='text-decoration: underline;' href="http://groups-beta.google.com/group/alt.www.webmaster" target="_blank">http://groups-beta.google.com/group/alt.www.webmaster</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 9) Posted: Wed Feb 23, 2005 8:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 24 Feb 2005 00:31:55 +0000, William Tasso <SpamBlocked RemoveThis @tbData.com>
wrote:

 > Rex Karz wrote:
  >> ...
  >> Still does not work.
  >> The hosting company says they do NOT run PHP as a module, for security
  >> reasons.
  >> Sigh! ... I'm sure the collective wisdom of this group will provide
  >> the answer. ... Keep the suggestions coming!
 >
 > New host?

That was my next suggestion as well.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/webslavent?msg=149" target="_blank">http://www.greywyvern.com/webslavent?msg=149</a> - It's Presto the Puffin!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
gfy

External


Since: Mar 08, 2004
Posts: 33



(Msg. 10) Posted: Wed Feb 23, 2005 8:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

William Tasso wrote:

 > Rex Karz wrote:
 >
  >> ...
  >> Still does not work.
  >>
  >> The hosting company says they do NOT run PHP as a module, for security
  >> reasons.
  >>
  >> Sigh! ... I'm sure the collective wisdom of this group will provide
  >> the answer. ... Keep the suggestions coming!
 >
 >
 > New host?
 >

Not yet. From the stories I hear, they are actually better than
most. So, I'd like to stick with 'em, if possible.

I believe that what I wanna do should be possible. I just can't
figure out how. ... I'm not an apache expert.

Suggestions, please! ... Definitive answers preferred. Very Happy


--
The name, "Rex Karz" is a pseudonym. The From: email address
is a spam trap. Messages sent to that address may cause the
sender's IP-address to be listed in one or more DNSBls.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
William Tasso

External


Since: Feb 03, 2005
Posts: 111



(Msg. 11) Posted: Wed Feb 23, 2005 9:35 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Rex Karz wrote:
 > William Tasso wrote:
  >> Rex Karz wrote:
   >>> ...
   >>> Sigh! ... I'm sure the collective wisdom of this group will provide
   >>> the answer. ... Keep the suggestions coming!
  >>
  >> New host?
 >
 > Not yet.

Not yet? ok.

 > From the stories I hear, they are actually better than most.

But, from the story you tell ........

--
William Tasso ------ read, read again, then post:
<a style='text-decoration: underline;' href="http://www.aww-faq.org/" target="_blank">http://www.aww-faq.org/</a>
<a style='text-decoration: underline;' href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>
<a style='text-decoration: underline;' href="http://groups-beta.google.com/group/alt.www.webmaster" target="_blank">http://groups-beta.google.com/group/alt.www.webmaster</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
usenetshit

External


Since: Jan 27, 2005
Posts: 85



(Msg. 12) Posted: Thu Feb 24, 2005 3:41 am
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While sitting in a puddle Rex Karz scribbled in the mud:

  >> New host?
  >>
 >
 > Not yet. From the stories I hear, they are actually better than
 > most. So, I'd like to stick with 'em, if possible.

Who are they?

--
D?
Adults die young.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 13) Posted: Thu Feb 24, 2005 10:10 am
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And lo, Rex Karz didst speak in alt.www.webmaster:

 > Not yet. From the stories I hear, they are actually better than most.

"The hosting company have been either unwilling or unable to answer a
question for me."
"Alternatively, they tell me to use some other technique that I explicitly
said I didn't wanna do"
"We've been going round & round for about a week now via email (no
telephone support) with no resolution."
"Something tells me they don't want me doing this, or that the tech
support folks don't know how to do it."
"The hosting company says they do NOT run PHP as a module, for security
reasons."

From the stories *I* hear, it seems a wonder they are still in business.
Could it be because of "loyal" customers like you?

 > So, I'd like to stick with 'em, if possible.

It's your funeral.

 > Suggestions, please! ... Definitive answers preferred. Very Happy

You've been given all the "Definitive answers" in this thread already.
Now you're looking for the "Special Situation answers". I'm sorry, but
none of us here work on your webserver, or know how it is configured.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/ringmaker" target="_blank">http://www.greywyvern.com/ringmaker</a> - Orca Ringmaker: Host a web ring
from your website!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
William Tasso

External


Since: Feb 03, 2005
Posts: 111



(Msg. 14) Posted: Thu Feb 24, 2005 3:17 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:
 > ....
 > none of us here work on your webserver, or know how it is configured.

we might do Wink

--
William Tasso ------ read, read again, then post:
<a style='text-decoration: underline;' href="http://www.aww-faq.org/" target="_blank">http://www.aww-faq.org/</a>
<a style='text-decoration: underline;' href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>
<a style='text-decoration: underline;' href="http://groups-beta.google.com/group/alt.www.webmaster" target="_blank">http://groups-beta.google.com/group/alt.www.webmaster</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 953



(Msg. 15) Posted: Thu Feb 24, 2005 3:17 pm
Post subject: Re: .htaccess question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And lo, William Tasso didst speak in alt.www.webmaster:

 > GreyWyvern wrote:
  >> ....
  >> none of us here work on your webserver, or know how it is configured.
 >
 > we might do Wink

I've got a nice sledgehammer here... When do we start?

Grey<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
htaccess question - Hi, How do I get to write the following as one line? RewriteCond %{HTTP_REFERER} !^http://images.google.co.uk/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.co.uk$ [NC] RewriteCond %{HTTP_REFERER} !^http://images.google.com.au/.*...

yet another HTACCESS question: hotlinking - hy, RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.nl/.*$ [NC] RewriteRule .*\.(jpg|gif|JPG|GIF)$ http://www.mydomain.nl/hotlink.gif [R,L] This prevents hotlinking (at least, for most browsers)...

htaccess rewrite code question - This code should, supposedly, convert everything that follows after / in the URL as GET data to the script. --------------------------------- Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.+)$ /?$1..

Help with .htaccess and 404. - Hi, In my .htaccess I have ErrorDocument 404 /Error404php.php And it works fine, but how do I know what page the user was looking for and was not found? lately my logs show 100's of 404, (a lot more than usual), so I suspect it is my fault but without...

.htaccess help - Hi, I want to redirect any access to image files on my website to a corresponding php file. For example, any request from external site to the file http://myhost.com/myimage.jpg will be redirected to the file http://myhost/view.php?file=myimage.jpg. How...
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]