Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function ganti_setiap_karakter($minta) {
- $minta = htmlspecialchars($minta);
- $minta = str_replace('/search/', '', $minta);
- $minta = str_replace('/', '', $minta);
- $minta_a = explode(' ',$minta);
- $minta_baru = array();
- foreach ($minta_a as $baru) {
- $minta_baru[] = ucwords(trim($baru));
- }
- $minta = implode(' ', $minta_baru);
- return $minta;
- }
- ?>
- <?php
- if($_SERVER['REQUEST_URI']){
- $gantikode = array (' ','++','+++','-');
- $urlredirect = get_settings('home') . '/article/' . strtolower(str_replace($gantikode, '-' ,ganti_setiap_karakter($_SERVER['REQUEST_URI']))) . '/';
- header("HTTP/1.1 301 Moved Permanently");
- header( "Location: $urlredirect" ) ;
- die();
- }
- ?>
Add Comment
Please, Sign In to add comment