Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Problem z mod_rewrite - przyjazne linki
m3tt
post
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 6.01.2011

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


Chciałem nauczyć się tworzenia przyjaznych linków więc znalazłem jakis prosty tutorial który pokazuje jak to zrobić. Przepisałem wszystko tak jak w tutorialu, niestety tam gdzie powinien zdziałać mod_rewrite serwer zwraca mi:

Cytat
Not Found
The requested URL /mod_rewrite/a/b/c was not found on this server.


A oto jak wyglądają pliki index.php i .htaccess

index.php
  1. <?php
  2.  
  3. if(isset($_GET['var1']))
  4. {
  5.  
  6. echo "Var1 =". $_GET['var1'];
  7. if(isset($_GET['var2']))
  8. {
  9.  
  10. echo "Var2 =". $_GET['var2'];
  11.  
  12. if(isset($_GET['var3']))
  13. {
  14.  
  15. echo "Var3 =". $_GET['var3'];
  16. }
  17. }
  18.  
  19. }
  20.  
  21.  
  22.  
  23.  
  24. ?>

.htaccess

Cytat
Options FollowSymLinks
RewriteEngine On
RewriteBase /mod_rewrite/

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?var1=$1&var2=$2&var3=$3


Oczywiście w php mam załadowany mod_rewrite i w apache'u tak samo.
Z góry dziękuję za pomoc (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
tehaha
post
Post #2





Grupa: Zarejestrowani
Postów: 1 748
Pomógł: 388
Dołączył: 21.08.2009
Skąd: Gdynia

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


a spróbuj wywalić RewriteBase /mod_rewrite/
Go to the top of the page
+Quote Post
m3tt
post
Post #3





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 6.01.2011

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


Nic nie daje.
Cytat
Not Found

The requested URL /mod_rewrite/a/b/c was not found on this server.

Cały czas to samo ;/
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 24.08.2025 - 06:04