Re: [PHP] generally, where in cPanel can one set the default page to load?

2009-07-02 Thread Govinda

On Jul 2, 2009, at 11:40 AM, Daniel Brown wrote:

On Thu, Jul 2, 2009 at 13:38, Govinda  
wrote:


I must not have mod-rewrite installed (I am 98% uneducated about
apache/server admin).
I will save your post though MIchael, for when I get more to that  
level..

 you gave a good lead.


   You've got mod_rewrite on there.  If you're getting an error of
some kind, you can let me know privately again.  (Sorry to keep
sending you back and forth!)


my error.
sorry/thanks!
-G

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] generally, where in cPanel can one set the default page to load?

2009-07-02 Thread Daniel Brown
On Thu, Jul 2, 2009 at 13:38, Govinda wrote:
>
> I must not have mod-rewrite installed (I am 98% uneducated about
> apache/server admin).
> I will save your post though MIchael, for when I get more to that level..
>  you gave a good lead.

You've got mod_rewrite on there.  If you're getting an error of
some kind, you can let me know privately again.  (Sorry to keep
sending you back and forth!)

> Meanwhile, Dan you gave me the quick fix lead I was after.
> DirectoryIndex index.php
> works.
> Found it at
> http://httpd.apache.org/docs/1.3/mod/mod_dir.html#directoryindex

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] generally, where in cPanel can one set the default page to load?

2009-07-02 Thread Govinda
If you have mod_rewrite installed - put the following in  
your .htaccess file:



RewriteEngine on

RewriteRule ^index\.html$ index.php [L]

That will cause index.php to be called when index.html is requested.
If you want it to forward to index.php then use [R] instead of [L]

If you want all .html to be sent to php equivalents -

RewriteRule (^.*)\.html$ $1.php [L]

should do the trick.

btw - with those rules, the .html files do not need to exist. If/ 
when they are requested, whether they exist or not, the link or  
redirect is made.


mod_rewrite rocks



Thanks to you both Michael & Dan,

I must not have mod-rewrite installed (I am 98% uneducated about  
apache/server admin).
I will save your post though MIchael, for when I get more to that  
level..  you gave a good lead.


Meanwhile, Dan you gave me the quick fix lead I was after.
DirectoryIndex index.php
works.
Found it at
http://httpd.apache.org/docs/1.3/mod/mod_dir.html#directoryindex

-G


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] generally, where in cPanel can one set the default page to load?

2009-07-02 Thread Michael A. Peters

Govinda wrote:

Dear list-members

I am using what I assume is a pretty standard cPanel setup (?)

I would like to be able change the mime types/extension so that ".html" 
gets sent through the PHP interpreter, but I see the cPanel docs say 
"...(note that you can not alter the system defined mime type values)..".


So as a workaround, I need to *at least* be able to change the default 
file to return to the browser when someone hits my domain (or a 
subdirectory) without specifying the page in that dir/ to load.
I cannot find where in cPanel to set that.  The default now is the 
standard "index.html".I want to change it to "index.php".

I realize this is really basic stuff, but I can't find it in my cPanel.

Can someone point me to this?

-Govinda



If you have mod_rewrite installed - put the following in your .htaccess 
file:



RewriteEngine on

RewriteRule ^index\.html$ index.php [L]

That will cause index.php to be called when index.html is requested.
If you want it to forward to index.php then use [R] instead of [L]

If you want all .html to be sent to php equivalents -

RewriteRule (^.*)\.html$ $1.php [L]

should do the trick.

btw - with those rules, the .html files do not need to exist. If/when 
they are requested, whether they exist or not, the link or redirect is made.


mod_rewrite rocks


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] generally, where in cPanel can one set the default page to load?

2009-07-02 Thread Daniel Brown
On Thu, Jul 2, 2009 at 12:40, Govinda wrote:
>
> Can someone point me to this?

Wrong list.  ;-P

In fact, check Google for .htaccess MIME aliasing.  It's nothing
to do with PHP, nor cPanel, really.


-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php