Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/06/2012, 18:30
Jhon Silver
 
Fecha de Ingreso: marzo-2004
Ubicación: Madrid (España)
Mensajes: 837
Antigüedad: 20 años, 1 mes
Puntos: 9
Problemas con mod write en Apache

He subido el archivo .htacces y archivo adjunto para crear urls amigables tipo teclado-virtual.php en vez php?id=14
Las urls se ven amigables pero me aparecen una serie de lineas en las que dice

Deprecated: Function ereg_replace() is deprecated in /home/artic/public_html/seourls.php on line 23

Deprecated: Function ereg_replace() is deprecated in /home/artic/public_html/seourls.php on line 23



Os paso el código de .htaccess
Código Apache:
Ver original
  1. RewriteEngine On
  2.  
  3. RewriteRule ^([^/]*)/([^/]*)/$ article.php?id=$1&title=$2 [L]
  4. RewriteRule ^profile/([^/]*)/([^/]*)/$ profile.php?a=$1&name=$2 [L]
  5. RewriteRule ^category/([^/]*)/([^/]*)/$ category.php?id=$1&name=$2 [L]
  6. RewriteRule ^page/([^/]*)/([^/]*)/$ page.php?p=$1&title=$2 [L]
  7.  
  8. RewriteRule ^start/([^/]*)/([^/]*)/$ index.php?page=$1&ipp=$2 [L]
  9.  
  10. RewriteRule ^category/([^/]*)/([^/]*)/start/([^/]*)/([^/]*)/$ category.php?id=$1&title=$2&page=$3&ipp=$4 [L]
  11.  
  12. RewriteCond %{REQUEST_FILENAME} !-f
  13. RewriteCond %{REQUEST_FILENAME} !-d
  14. RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  15. RewriteRule (.*)$ %{REQUEST_URI}/ [R=301,L]

Y el código php del archivo seourls.php
Código PHP:
Ver original
  1. <?php
  2.  
  3.  
  4.  
  5.  
  6.  
  7. GENERATE SEO URLS */
  8. function generate_seo_link($input,$replace = '-',$remove_words = true,$words_array = array())
  9. {
  10.     //make it lowercase, remove punctuation, remove multiple/leading/ending spaces
  11.     $return = trim(ereg_replace(' +',' ',preg_replace('/[^a-zA-Z0-9\s]/','',strtolower($input))));
  12.  
  13.     //remove words, if not helpful to seo
  14.     //i like my defaults list in remove_words(), so I wont pass that array
  15.     if($remove_words) { $return = remove_words($return,$replace,$words_array); }
  16.  
  17.     //convert the spaces to whatever the user wants
  18.     //usually a dash or underscore..
  19.     //...then return the value.
  20.     return str_replace(' ',$replace,$return);
  21. }
  22.  
  23. /* takes an input, scrubs unnecessary words */
  24. function remove_words($input,$replace,$words_array = array(),$unique_words = true)
  25. {
  26.     //separate all words based on spaces
  27.     $input_array = explode(' ',$input);
  28.  
  29.     //create the return array
  30.     $return = array();
  31.  
  32.     //loops through words, remove bad words, keep good ones
  33.     foreach($input_array as $word)
  34.     {
  35.         //if it's a word we should add...
  36.         if(!in_array($word,$words_array) && ($unique_words ? !in_array($word,$return) : true))
  37.         {
  38.             $return[] = $word;
  39.         }
  40.     }
  41.  
  42.     //return good words separated by dashes
  43.     return implode($replace,$return);
  44. }
  45.  
  46. ?>

¿Que creeis que ocurre para que aparezca las líneas de código?
Perdón por el desconocimiento