Re: [PHP] .htaccess - change index.php to index.abc

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 3:38 pm, Jochem Maas wrote:
> no warranty is available - I happily lose days trying to get
> RewriteRules
> running and tuned :-P chances are it requires tweaking to get working.

Which is one of the reasons I abandoned mod_rewrite as a solution for
URL-munging.

MUCH easier to use .htaccess and Files/ForceType to get what I want to
be PHP, and then to access $_SERVER['PATH_INFO'] to get the
URL-parameters.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] .htaccess - change index.php to index.abc

2006-06-06 Thread Jochem Maas
Joe Wollard wrote:
> If you don't want to change the names of the files themselve from .php to
> .abc then you'd need to use something like mod_rewrite for apache's HTTPD.
> I'm not entirely certain as to how you'd do this, but I've included what I
> normally use to hide index.php in the url. If possible I'd put this in
> httpd.conf instead of .htaccess - there are performance concerns that
> may be
> involved there. Anyway, I hope this gets you started or sparks an idea from
> another list member.
> 
> 
>  RewriteEngine on
>  RewriteBase /
> 
>  RewriteCond %{REQUEST_FILENAME} !-f
>  RewriteCond %{REQUEST_FILENAME} !-d

off the top of my head, the following rule would
translate 'afilenamestub.foo' (where 'foo' can be any extension,
and 'afilenamestub' can contain dots) to 'afilenamestub.php':

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

combined with the RewriteConds given above (to only rewrite
when a file doesn't exist and/or isn't a dir)

no warranty is available - I happily lose days trying to get RewriteRules
running and tuned :-P chances are it requires tweaking to get working.

>  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
> 

..

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



Re: [PHP] .htaccess - change index.php to index.abc

2006-06-05 Thread Richard Lynch
On Sat, June 3, 2006 6:47 pm, Labunski wrote:
> What should I change in .htaccess, so that visitors will see index.abc
> instead of index.php.
> I just wanna hide file's extension.

Assuming you use PHP as Module and not CGI:


  ForceType application/x-httpd-php


-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] .htaccess - change index.php to index.abc

2006-06-03 Thread Joe Wollard

If you don't want to change the names of the files themselve from .php to
.abc then you'd need to use something like mod_rewrite for apache's HTTPD.
I'm not entirely certain as to how you'd do this, but I've included what I
normally use to hide index.php in the url. If possible I'd put this in
httpd.conf instead of .htaccess - there are performance concerns that may be
involved there. Anyway, I hope this gets you started or sparks an idea from
another list member.


 RewriteEngine on
 RewriteBase /

 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1 [L,QSA]




On 6/3/06, Labunski <[EMAIL PROTECTED]> wrote:


Hello,

What should I change in .htaccess, so that visitors will see index.abc
instead of index.php.
I just wanna hide file's extension.

Thanks

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




[PHP] .htaccess - change index.php to index.abc

2006-06-03 Thread Labunski
Hello,

What should I change in .htaccess, so that visitors will see index.abc 
instead of index.php.
I just wanna hide file's extension.

Thanks 

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