Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
At 11:29 03.03.2003, Cranky said:
[snip]
>Thanks for this reply.
>But I can not use the mod-rewrite because my site is on a shared hosting.
>
>Another idea ?
[snip] 

Ask your sysadmin to install the mod-rewrite for your site to the
 configuration. They should do this without asking too much ...


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Cranky
Thanks for this reply.
But I can not use the mod-rewrite because my site is on a shared hosting.

Another idea ?

Thanks


"Ernest E Vogelsinger" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> At 10:21 03.03.2003, Cranky said:
> [snip]
> >I have a website and all my files are *.php3
> >I would like to change the extensions of all files to *.php
> >
> >So I would like to know if there is a way perhaps with a .htaccess file
to
> >say that the file .php3 must be redirect to the same file but in *.php
> >
> >So when I try to access this page :
> >http://www.my-site.com/page.php3?param=value
> >
> >I will access this page :
> >http://www.my-site.com/page.php?param=value
> [snip]
>
> If you have the ability to use mod-rewrite, you can do
>
> RewriteEngine On
> RewriteCond %{REQUEST_URI}  ^.*\.php3.*$ [NC]
> RewriteRule ^(.*)\.php3(.*)$  $1.php$2 [L]
>
> This can be done either in the general configuration, within
,
> or within .
>
> I am using exactly this stuff to allow legacy links to a site that has
been
> developed in Python (*.py) to access the same URLs as PHP files.
>
>
> --
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>



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



Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
At 10:21 03.03.2003, Cranky said:
[snip]
>I have a website and all my files are *.php3
>I would like to change the extensions of all files to *.php
>
>So I would like to know if there is a way perhaps with a .htaccess file to
>say that the file .php3 must be redirect to the same file but in *.php
>
>So when I try to access this page :
>http://www.my-site.com/page.php3?param=value
>
>I will access this page :
>http://www.my-site.com/page.php?param=value
[snip] 

If you have the ability to use mod-rewrite, you can do

RewriteEngine On
RewriteCond %{REQUEST_URI}  ^.*\.php3.*$ [NC]
RewriteRule ^(.*)\.php3(.*)$  $1.php$2 [L]

This can be done either in the general configuration, within ,
or within .

I am using exactly this stuff to allow legacy links to a site that has been
developed in Python (*.py) to access the same URLs as PHP files.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



[PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Cranky
Hello,
I have a website and all my files are *.php3

I would like to change the extensions of all files to *.php

My problem is for the search engine and links to my site.
Because the site is well referenced in the search engine with files liek
*.php3

So if I rename all files in .php, the links in the search engine will be
broken

So I would like to know if there is a way perhaps with a .htaccess file to
say that the file .php3 must be redirect to the same file but in *.php

So when I try to access this page :
http://www.my-site.com/page.php3?param=value

I will access this page :
http://www.my-site.com/page.php?param=value

Thanks a lot



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