Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne]Przyjazny link
qbas-s
post
Post #1





Grupa: Zarejestrowani
Postów: 304
Pomógł: 1
Dołączył: 28.06.2009

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


jak zrobić z linka /oferta/?lang=pl_pl link /pl_pl/oferta ?

Ten post edytował qbas-s 17.09.2014, 10:26:20
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




To sie nazywa ładne url. Mozesz też szukac pod hasłem mod rewrite. Pelno tego w necie. Poszukaj


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

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





Grupa: Zarejestrowani
Postów: 459
Pomógł: 26
Dołączył: 1.06.2009

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


Kod
RewriteRule ^/oferta/?lang=(.*)$ /$1/oferta [L,NC]


Zautomatyzuj sobie dla innych języków.


--------------------
Go to the top of the page
+Quote Post
qbas-s
post
Post #4





Grupa: Zarejestrowani
Postów: 304
Pomógł: 1
Dołączył: 28.06.2009

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


nie działa, mam tak

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^/oferta/?lang=(.*)$ /$1/oferta [L,NC]
RewriteRule ^/offer/?lang=(.*)$ /$1/offer [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

# END WordPress
Go to the top of the page
+Quote Post
Daimos
post
Post #5





Grupa: Zarejestrowani
Postów: 1 319
Pomógł: 118
Dołączył: 26.11.2003
Skąd: Lublin

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


Masz wordpressa? To w konfiguracji sobie to ustaw!


--------------------
scriptun.com. Startup z poradnikami do gier ttp.zone i ttpzone.pl
Go to the top of the page
+Quote Post
qbas-s
post
Post #6





Grupa: Zarejestrowani
Postów: 304
Pomógł: 1
Dołączył: 28.06.2009

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


próbowałem /%lang%/%category%/%postname%/ ale nie działa

Ten post edytował qbas-s 17.09.2014, 11:16:23
Go to the top of the page
+Quote Post
djgarsi
post
Post #7





Grupa: Zarejestrowani
Postów: 459
Pomógł: 26
Dołączył: 1.06.2009

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


A linki domena.pl/oferta/?lang=pl_pl albo domena.pl/oferta/?lang=en_en działają normalnie?


--------------------
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: 20.08.2025 - 04:53