Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: Hidden php extension Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
orthus
Newbie
Newbie


Joined: 09 September 2008
Online Status: Offline
Posts: 5
Posted: 10 September 2008 at 4:06am | IP Logged Quote orthus

Hi All,

I am new with the mod rewriting. I am tried to hide the php extension from url with the following rule:

RewriteRule ^([^\.\?]+)(\?.*/)?$ $1.php

It works for URL like : www.mysite.com/page but when I am in a directory level like: www.mysite.com or www.mysite.com/articles/ , It doesn't work, I am getting a 404 page error.

I tried to add the Condition
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?]+)(\?.*/)?$ $1.php

but it still not working.

I aprreciate any help
Thanks in advance




 





 as long as I am not at in  a main directory li

 
Back to Top View orthus's Profile Search for other posts by orthus
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 19 September 2008 at 1:50pm | IP Logged Quote Lexey

ISAPI_Rewtite 2 does not support file/directory existance conditions. So, there is no reliable way to distinguish a file from a directory.
Back to Top View Lexey's Profile Search for other posts by Lexey
 
orthus
Newbie
Newbie


Joined: 09 September 2008
Online Status: Offline
Posts: 5
Posted: 22 September 2008 at 3:11am | IP Logged Quote orthus

Ok I see, I think I'll update my server to version 3.  Thanks lexey for your answer.
Back to Top View orthus's Profile Search for other posts by orthus
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

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