Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Convert Uppercase To Lowercase In Htaccess 
 
how can I redirect some links in lowercase in .htaccess?

RedirectMatch 301 ^/folder/(.*?)\.php$ http://www.site.it/folder/(>($1)/artista.php <)/artista.php


(> ($1) in lowercase <) in lowercase


example:

from: /folder/ADAMS.php
to: /folder/adams/artista.php


     
 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Convert Uppercase To Lowercase In Htaccess 
 
Only using htaccess is a bit tough... or at least I don't know how to do that... you should ask Apache specialists.

In cases like this I personally use PHP code... I redirect all requests to a php file which then parse the address and redirect where I want to.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Convert Uppercase To Lowercase In Htaccess 
 
Thanks MG, I found an other way.

I create this file that modify all files I want to redirect to.

Code: [Download] [Hide] [Select]
    $path = "./";
    $dir_handle = @opendir($path) or die("Can't open $path");
    
    while ($file = readdir($dir_handle))
        if($file[0]!=".")
        {
            $fp = fopen($file, "w");
            if(!$fp)
                die ("Error");
            fwrite($fp, '<? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.pugliabaila.it/discografie/" . strtolower(substr($_SERVER[\'PHP_SELF\'], 13, -4)) . "/artista.php" ); ?> ');
            $fp = fclose($fp);
        }
    closedir($dir_handle);

 



 
Gianni PBSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Convert Uppercase To Lowercase In Htaccess 
 
That was exactly what I was suggesting... PHP redirect.

Glad you solved.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron