This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: redirect only .aspx files Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Chimney72
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 5
Posted: 21 January 2011 at 6:14am | IP Logged Quote Chimney72

I'm develloping a website on IIS6 with mod_rewrite enabled in Isapi Rewrite 2. I'm having a problem redirecting anything but .aspx files.
I've got:
RewriteEngine On
RewriteRule (.*) info.php [I,L]

when i go to www.domain.com/test i get a 404. when i go to www.domain.com/test.aspx it shows the info.php.
I should say that there is asp.net installed as well as php. What am i doing wrong?   
Back to Top View Chimney72's Profile Search for other posts by Chimney72
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 21 January 2011 at 7:49am | IP Logged Quote Anton

"I'm having a problem redirecting anything but .aspx files."
For ISAPI_Rewrite2 it will be:

[ISAPI_Rewrite]
RewriteRule (?!.*\.aspx).* /info.php [I,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Chimney72
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 5
Posted: 21 January 2011 at 8:06am | IP Logged Quote Chimney72

When i try that i still get a 404 on /test
On /test.aspx i get:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /test.aspx

Just to make it clear. It is not possible to use RewriteEngine On even when the hosting company sais i can?
Back to Top View Chimney72's Profile Search for other posts by Chimney72
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 January 2011 at 3:26am | IP Logged Quote Anton

Could you clarify which version of ISAPI_Rewrite you are using - 2 or 3?
And also please outline how you need to process different types of requests (e.g. /test, /test.aspx, /test.php)?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Chimney72
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 5
Posted: 24 January 2011 at 4:34am | IP Logged Quote Chimney72

I'm using ISAPI_Rewrite 2. Is hould be able to use .htaccess, which seems to be working, except only if i type .aspx in de url.
e.g. /test.aspx does work, it redirects to the right page, but /test doesn't work i get a 404.
Could it have anything to do with how asp.net handles requests without .aspx?
Back to Top View Chimney72's Profile Search for other posts by Chimney72
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 January 2011 at 5:45am | IP Logged Quote Anton

Where do you need /test request to be directed? What is the destination for this request?

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Chimney72
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 5
Posted: 24 January 2011 at 6:00am | IP Logged Quote Chimney72

Doesn't matter, say info.php. Finally i should be able to get
RewriteRule ^([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]*)/?$ ./index.php?parent=$1&paginanaam=$2 [L]
But first i need to figure out why /*.aspx is redirecting and /* is not, i don't want to change all links so that there is .aspx in them.
Back to Top View Chimney72's Profile Search for other posts by Chimney72
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 January 2011 at 8:24am | IP Logged Quote Anton

Well, your situation is rather strange.
Firstly, please tell if you have any other ISAPI filters registered.
And also if it's possible to get remote access to your server to try figure out the problem.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
Chimney72
Newbie
Newbie


Joined: 21 January 2011
Online Status: Offline
Posts: 5
Posted: 24 January 2011 at 11:50am | IP Logged Quote Chimney72

I thought it was strange too. My hosting provider had told me mod-rewrite was enabled, but today they found out it was not. They enabled it and now everything is working fine. You can imagine i was pretty !@#$%
Sorry to have bothered you with it, but thanx for your replies.
Back to Top View Chimney72's Profile Search for other posts by Chimney72
 

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