Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Problem w przerobieniu rewrite na nginx, j/w
LordGM
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 5.11.2005

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


Mam problem w przerobieniu htaccess z apache na nginx. Jest ktoś wstanie pomóc? Kod nie jest długi
  1. SetEnv PHP_VER 5
  2.  
  3. RewriteEngine On
  4.  
  5. RewriteRule ^([a-zA-Z0-9\-\_]+).html$ index.php?p=$1
  6. RewriteRule ^([a-zA-Z0-9\-\_]+),([a-zA-Z0-9\-\_]+).html$ index.php?p=$1&action=$2
  7. RewriteRule ^([a-zA-Z0-9\-\_]+),([a-zA-Z0-9\-\_]+),([a-zA-Z0-9\-\_]+).html$ index.php?p=$1&action=$2&id=$3


Próbowałem użyć generatorów ale nie rusza :/ (IMG:style_emoticons/default/ohno-smiley.gif)
Go to the top of the page
+Quote Post
Pyton_000
post
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Może coś takiego:
Kod
rewrite ~* ^([a-z0-9_-]+).html index.php?=$1

i analogicznie dla pozostałych
Go to the top of the page
+Quote Post
LordGM
post
Post #3





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 5.11.2005

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


Wlasnie niestety nie dziala :/
Go to the top of the page
+Quote Post
Pyton_000
post
Post #4





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Wklejasz cały .htaccess
http://winginx.com/en/htaccess

http://piotrows.pl/iindex,22,444.html

Ten post edytował Pyton_000 9.11.2014, 18:19:24
Go to the top of the page
+Quote Post
LordGM
post
Post #5





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 5.11.2005

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


W htaccess niestety dalej nie działał kod, dopiero po wprowadzeniu w configuracje nginx ruszyło. Troche dziwne ale ostatecznie ujdzie (IMG:style_emoticons/default/smile.gif)

Dzięki za pomoc (IMG:style_emoticons/default/Lkingsmiley.png)
Go to the top of the page
+Quote Post
Pyton_000
post
Post #6





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Że co?? Czy Ty próbowałeś zmisić Ngnix do czytania z htaccess?? Czyś ty zwariował? (IMG:style_emoticons/default/smile.gif)
Przecież nginx słynie z tego że nie używa tego badziewnego htaccess. To nie ta liga (IMG:style_emoticons/default/smile.gif)
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: 18.09.2025 - 01:09