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
.htaccess: rewrite rule bez ekstenzije?

 
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
sime
Guest





PostPosted: 12.03.2005 17:07    Post subject: .htaccess: rewrite rule bez ekstenzije? Reply with quote

Zanima me kako ono ide rewrite rule koji omogućava prikazivanje stranice bez ekstenzije, ali da nije Options +MultiViews, nego samo za specifične ekstenzije, primjer:

http://asasd.com/stranica.html
da radi i kao:
http://asasd.com/stranica

Eto, to, ali samo za .html recimo, da ne utječe na ostale. +MultiViews to radi, ali za sve ekstenzije, a ja sam ima negdi i ovo što mi treba ali sad ne mogu nikako naći... Hvala.
Back to top
1ONE



Joined: 13 Mar 2004
Posts: 136
Location: Zagreb

PostPosted: 13.03.2005 14:05    Post subject: Add user to your forum ignore list Reply with quote

U j*bote... nemam pojma Smile

_________________
have fun
Back to top
View user's profile Send private message
liban0n



Joined: 10 Feb 2004
Posts: 128
Location: Dubrovnik, Zagreb

PostPosted: 16.03.2005 15:35    Post subject: Add user to your forum ignore list Reply with quote

RewriteEngine On
RewriteRule ^stranica$ /stranica.html [L]

Eto ga Smile

_________________
mount -t swap /dev/brain /mnt/head
look'n for a job
Back to top
View user's profile Send private message Visit poster's website
sime
Guest





PostPosted: 16.03.2005 15:45    Post subject: Reply with quote

liban0n wrote:
RewriteEngine On
RewriteRule ^stranica$ /stranica.html [L]

Eto ga :)

Ne, nije to, to je samo za "stranica.html" :) Ali ja sam trazia za bilo koji .html file. Ali samo da ima učinka na .html, na ostale fileove ne.
Back to top
xpi



Joined: 21 Jan 2004
Posts: 33

PostPosted: 16.03.2005 19:21    Post subject: Add user to your forum ignore list Reply with quote

Na... Dakle, kad posjetitelj ode na adresu koja završava na ".html", a dotični fajl s nastavkom ".html" ne postoji na serveru, mi ćemo reći neka se uzme istoimeni fajl bez tog nastavka. Ako ni taj ne postoji, onda nek se baci greška 404, je li...

Code:
RewriteEngine  On
RewriteCond    %{REQUEST_URI}     \.html$
RewriteCond    %{DOCUMENT_ROOT}/%{REQUEST_URI}    !-f
RewriteRule    (.*)\.html$    $1
Back to top
View user's profile Send private message
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