Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [htaccess][PHP][inne] redirect 302 na 301
milk
post 10.11.2010, 09:59:14
Post #1





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 25.08.2010

Ostrzeżenie: (0%)
-----


witam wszystkich!

moj htaccess wyglada tak

RewriteEngine on
Redirect 302 ^(.*)$ /redirect.php/$1
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L,NC,PT]

  1. function redirect($url, $type=301)
  2. {
  3. if ($type == 301) header("HTTP/1.1 301 Moved Permanently");
  4. header("Location: $url");
  5. exit();
  6. }
  7. redirect("http://www.mojastrona.pl") ;


co robie zle?

chodzi mi o ustawienie przekierowania z 302 na 301 dla nieistniejacych podstron

PROSZE O POMOC!
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:02