Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> plik index.php
pys1986
post 2.03.2007, 12:07:37
Post #1





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


mam adres http://localhost/index.php/strona1/
i chce zeby nie wyswietlal sie w adresie "index.php"
Go to the top of the page
+Quote Post
kriqs
post 2.03.2007, 12:46:15
Post #2





Grupa: Zarejestrowani
Postów: 148
Pomógł: 0
Dołączył: 31.05.2006

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


witam

poczytaj o tym : mod_rewrite


--------------------
Pozdrawiam
kriqs

mam nadzieje ze pomoglem :)
Go to the top of the page
+Quote Post
pys1986
post 2.03.2007, 22:03:55
Post #3





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


szukalem ale nie znalazlem sad.gif
Go to the top of the page
+Quote Post
xmarcin
post 2.03.2007, 23:20:46
Post #4





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 19.07.2006

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


mam nadzieje ze to pomoze smile.gif
http://phppl.ezpublish.no/wortal/artykuly/.../przyjazne_urle
(przeczytaj caly art - warto)
Go to the top of the page
+Quote Post
pys1986
post 3.03.2007, 07:44:46
Post #5





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


juz to czytalem i nie pomoglo sad.gif
Go to the top of the page
+Quote Post
Athlan
post 3.03.2007, 10:52:35
Post #6





Grupa: Developerzy
Postów: 823
Pomógł: 12
Dołączył: 18.12.2005

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


Super opisane:
http://home.pl/pomoc/kursy/rewrite

Zaawansowane przykłady:
http://haxite.org/index.php3?site=artykul&...view&id=589


--------------------
Portfolio: Vgroup.pl | athlan.pl | Test.php.pl - sprawdź się z wiedzy o PHP i ułóż własne pytania!
Pomogłem? Kliknij pod postem.
Go to the top of the page
+Quote Post
pys1986
post 3.03.2007, 15:54:22
Post #7





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


i tak nie kumam sad.gif chodzi mi tylko o to zeby w adresie ukryc "index.php"
Go to the top of the page
+Quote Post
kriqs
post 3.03.2007, 16:13:31
Post #8





Grupa: Zarejestrowani
Postów: 148
Pomógł: 0
Dołączył: 31.05.2006

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


nie rozumiem jak czytales questionmark.gif przeciez to jest latwe jak budowa cepa smile.gif
  1. <?php
  2. RewriteEngine On
  3. RewriteCond %{REQUEST_FILENAME} !-f
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteRule (.*) index.php [L]
  6.  
  7. $_SERVER["REQUEST_URI"]
  8. ?>


teraz juz wiesz questionmark.gif co nalezy zrobic questionmark.gif


--------------------
Pozdrawiam
kriqs

mam nadzieje ze pomoglem :)
Go to the top of the page
+Quote Post
pys1986
post 4.03.2007, 21:16:17
Post #9





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


no dobra a teraz jak mam taki adres http://adres.pl/as/df/ i chce z tego zrobic http://adres.pl/index.php/as/df/ poprostu zawsze po adresie dodac index.php przed zmiennymi sad.gif
Go to the top of the page
+Quote Post
wipo
post 4.03.2007, 21:20:14
Post #10





Grupa: Zarejestrowani
Postów: 856
Pomógł: 19
Dołączył: 30.08.2005
Skąd: 100lica

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


A tak się zapytam co zamierzasz osiągnąć? bo jakoś nie czaje


--------------------
Go to the top of the page
+Quote Post
pys1986
post 5.03.2007, 10:21:54
Post #11





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


mam strona ktora na serwerze uzywa linkow http://adres.pl/as/df/ a na localhoscie musze recznie dodawac index.php bo inaczej nie chodzi sad.gif
Go to the top of the page
+Quote Post
kriqs
post 5.03.2007, 10:36:01
Post #12





Grupa: Zarejestrowani
Postów: 148
Pomógł: 0
Dołączył: 31.05.2006

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


no to przekopiuj sobie plik .htaccess i daj do glownego katalogu smile.gif


--------------------
Pozdrawiam
kriqs

mam nadzieje ze pomoglem :)
Go to the top of the page
+Quote Post
pys1986
post 5.03.2007, 13:05:48
Post #13





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


problem w tym ze na serwerze niema tego pliku sad.gif
Go to the top of the page
+Quote Post
strife
post 5.03.2007, 13:11:55
Post #14





Grupa: Przyjaciele php.pl
Postów: 2 605
Pomógł: 96
Dołączył: 22.10.2004
Skąd: UK

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


Cytat(pys1986 @ 5.03.2007, 13:05:48 ) *
problem w tym ze na serwerze niema tego pliku sad.gif

Żarty sobie z nas robisz czy co ? Jak takiego pliku nie ma to go stwórz, to też mamy za Ciebie zrobić ?


--------------------
Go to the top of the page
+Quote Post
pys1986
post 5.03.2007, 19:47:35
Post #15





Grupa: Zarejestrowani
Postów: 233
Pomógł: 0
Dołączył: 18.01.2005

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


no to tak: znalazlem ten plik ale gdy wrzuce go na localhosta to wyskakuje mi błąd:

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.33 Server at localhost Port 80"

a plik ma taką postac:

"RewriteEngine on
RewriteRule ^([^.]*)$ /index.php?url=$1 [NC,L]"

uzywam EasyPHP
Go to the top of the page
+Quote Post
Athlan
post 6.03.2007, 17:46:14
Post #16





Grupa: Developerzy
Postów: 823
Pomógł: 12
Dołączył: 18.12.2005

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


@pys1986, chyba żarty... daj sobie:

Kod
RewriteEngine On
RewriteBase /jakis/moj/folder/w/ktorym/jest/strona/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php


Jeżeli strona jest w katalogu główym, wówczas parametr w drugiej linii ustaw na /

Pozdrawiam, Athlan smile.gif


--------------------
Portfolio: Vgroup.pl | athlan.pl | Test.php.pl - sprawdź się z wiedzy o PHP i ułóż własne pytania!
Pomogłem? Kliknij pod postem.
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: 10.07.2025 - 05:44