| Author |
|
Chimney72 Newbie

Joined: 21 January 2011
Online Status: Offline Posts: 5
|
| Posted: 21 January 2011 at 6:14am | IP Logged
|
|
|
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 |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 21 January 2011 at 7:49am | IP Logged
|
|
|
"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 |
|
| |
Chimney72 Newbie

Joined: 21 January 2011
Online Status: Offline Posts: 5
|
| Posted: 21 January 2011 at 8:06am | IP Logged
|
|
|
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 |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 24 January 2011 at 3:26am | IP Logged
|
|
|
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 |
|
| |
Chimney72 Newbie

Joined: 21 January 2011
Online Status: Offline Posts: 5
|
| Posted: 24 January 2011 at 4:34am | IP Logged
|
|
|
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 |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 24 January 2011 at 5:45am | IP Logged
|
|
|
Where do you need /test request to be directed? What is the destination for this request?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Chimney72 Newbie

Joined: 21 January 2011
Online Status: Offline Posts: 5
|
| Posted: 24 January 2011 at 6:00am | IP Logged
|
|
|
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 |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 24 January 2011 at 8:24am | IP Logged
|
|
|
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 |
|
| |
Chimney72 Newbie

Joined: 21 January 2011
Online Status: Offline Posts: 5
|
| Posted: 24 January 2011 at 11:50am | IP Logged
|
|
|
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 |
|
| |