Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z htaccess
Goleo
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.07.2009

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


Mam na stronie taki htaccess:


  1. <?php
  2. RewriteEngine on
  3. RewriteBase /
  4. RewriteRule ^historia.html strona-1 [QSA,R=301]
  5. RewriteRule ^dojazd.html strona-2 [QSA,R=301]
  6. RewriteRule ^lotnisko.html strona-3 [QSA,R=301]
  7. RewriteRule ^linki.html linki.php [QSA,R=301]
  8. RewriteRule ^kontakt.html kontakt.php [QSA,R=301]
  9. RewriteRule ^polityka.html strona-11 [QSA,R=301]
  10. RewriteRule ^galeria.html galeria.php [QSA,R=301]
  11. RewriteRule ^galeria-jasionka.html galeria-10 [QSA,R=301]
  12. RewriteRule ^galeria-video.html pokazvideo.php [QSA,R=301]
  13. RewriteRule ^galeria-video-mi2.html video-29 [QSA,R=301]
  14. RewriteRule ^galeria-video-r44.html video-30 [QSA,R=301]
  15. RewriteRule ^rozwoj-osrodka.html artykul-58 [QSA,R=301]
  16. RewriteRule ^loty-wznowione.html artykul-60 [QSA,R=301]
  17. RewriteRule ^goraszka-piknik-2009.html artykul-59 [QSA,R=301]
  18. RewriteRule ^dziesiata-rocznica-okl.html artykul-61 [QSA,L,R=301]
  19. ?>



Niestety jak wpisuję adres stary podstrony: np. adresstrony.pl/historia.html nie przekierowuje na adresstrony.pl/strona-1

Czy mógłby mi ktoś powiedzieć, co w tym kodzie jest źle?

Bardziej zajmuję się grafiką komputerową, na programowaniu się nie znam.winksmiley.jpg
Z góry dzięki za pomoc
Go to the top of the page
+Quote Post
seth-kk
post
Post #2





Grupa: Zarejestrowani
Postów: 444
Pomógł: 79
Dołączył: 26.05.2009

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


  1. <?php
  2. RewriteRule ^historia.html /strona-1 [QSA,R=301,L]
  3. ?>


--------------------
Go to the top of the page
+Quote Post
Goleo
post
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.07.2009

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


  1. <?php
  2. RewriteEngine on
  3. RewriteBase /
  4. RewriteRule ^historia.html /strona-1 [QSA,R=301,L]
  5. RewriteRule ^dojazd.html /strona-2 [QSA,R=301,L]
  6. RewriteRule ^lotnisko.html /strona-3 [QSA,R=301,L]
  7. RewriteRule ^linki.html /linki.php [QSA,R=301,L]
  8. RewriteRule ^kontakt.html /kontakt.php [QSA,R=301,L]
  9. RewriteRule ^polityka.html /strona-11 [QSA,R=301,L]
  10. RewriteRule ^galeria.html /galeria.php [QSA,R=301,L]
  11. RewriteRule ^galeria-jasionka.html /galeria-10 [QSA,R=301,L]
  12. RewriteRule ^galeria-video.html /pokazvideo.php [QSA,R=301,L]
  13. RewriteRule ^galeria-video-mi2.html /video-29 [QSA,R=301,L]
  14. RewriteRule ^galeria-video-r44.html /video-30 [QSA,R=301,L]
  15. RewriteRule ^rozwoj-osrodka.html /artykul-58 [QSA,R=301,L]
  16. RewriteRule ^loty-wznowione.html /artykul-60 [QSA,R=301,L]
  17. RewriteRule ^goraszka-piknik-2009.html /artykul-59 [QSA,R=301,L]
  18. RewriteRule ^dziesiata-rocznica-okl.html /artykul-61 [QSA,R=301,L]
  19. ?>


Teraz nowe strony, np strona-1 wyświetlają się z błędem 404. Mimo iż przed wgraniem .htaccess te podstrony były.
Co jest źle?
Go to the top of the page
+Quote Post
seth-kk
post
Post #4





Grupa: Zarejestrowani
Postów: 444
Pomógł: 79
Dołączył: 26.05.2009

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


brakuje rozszerzenia?


--------------------
Go to the top of the page
+Quote Post
Goleo
post
Post #5





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 4.07.2009

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


Cytat(seth-kk @ 5.07.2009, 01:04:47 ) *
brakuje rozszerzenia?


Próbowałem wpisać ten adres: www.adresstrony.pl/kontakt.html i pojawił się błąd 404.
Mimo że jest podane rozszerzenie do pliku kontakt.php.
  1. <?php
  2. RewriteRule ^kontakt.html /kontakt.php [QSA,R=301,L]
  3. ?>

Dalej jest coś źle. blinksmiley.gif
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 Aktualny czas: 21.08.2025 - 06:42