Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
php file bez ekxtenzije?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 14.03.2007 23:04    Post subject: php file bez ekxtenzije? Add user to your forum ignore list Reply with quote

Jel moguce u .htaccess nastimat da se file bez extenzije tretira kao php ?

znaci imam /var/www/file
bljak ...

Nije moje maslo....

ili mozda neki rewrite koji
www.example.com/index/asd/asd/asd/asd/_asd/_asd/123_1.jpg
rewrite-a u www.example.com/index.php/asd/asd/asd/asd/_asd/_asd/123_1.jpg
probo sam sa ^index/(.*)$ index.php/$1
al mi neide :/


Hvala!

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
mfloyd



Joined: 25 Jan 2006
Posts: 57
Location: Zagreb <-> Orahovica

PostPosted: 15.03.2007 11:17    Post subject: Add user to your forum ignore list Reply with quote

.htaccess
Code:

RewriteEngine On
RewriteBase /

RewriteRule ^(index|index2|bilo-koje-ime)?$ /$1.php [L]
RewriteRule ^([A-Za-z0-9-]+)?$ /$1.php [L]


Prvi RewriteRule će od www.example.com/index ili www.example.com/index2 ili www.example.com/bilo-koje-ime pretvoriti u www.example.com/index.php, www.example.com/index2.php, www.example.com/bilo-koje-ime.php

Drugi RewriteRule će www.example.com/bilo-sta-007 pretvara u www.example.com/bilo-sta-007.php

Znači ako znaš točna imena fileova i nema ih puno koristiš prvi, a ako ne složiš si regularni izlaz i koristiš drugi.

Nadam se da je to to, i da sam ti pomogao.
Back to top
View user's profile Send private message Visit poster's website
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 15.03.2007 18:59    Post subject: Add user to your forum ignore list Reply with quote

RewriteRule ^index/(.*)$ index.php/$1

ovo mi zapravo pomaze! Smile
Ali hvala svejedno!

jos nisam skuzio kak da sibam index bez php extenzije, ali rename u index.php i onda rewriteovima rjesavam ostale probleme Smile

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group