|
Home > Archive > Apache Server configuration support > November 2006 > Url Rewriting + "GET" error
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Url Rewriting + "GET" error
|
|
| d'Artagnan 2006-11-30, 7:29 am |
| Hello everyone,
Here is my question. I set up small script in my .htaccess file:
RewriteEngine on
RewriteRule ^(.*)-test\.html$ /test.mvc [L]
In my httpd.conf I have no Rewrite rule and it's a dedicated box with
Red Hat 7.2 + Apache 1.3.33
Now what's weird is that on a direct link (like navigating on the
website) it is working, no problem at all. BUT, when I make a GET
request on the url I have a forbidden message. This is very annoying
because google will not spider my website.
And second question, does anybody know why Apache 1.3.33 won't let me
use backslash in my rewrite script? When I use '/' like:
RewriteRule ^(.*)/test\.html$ /test.mvc [L] I have a forbidden error.
I think he's thinking that we deal with some directory. It's not
very annoying because I can change my separator character like I want
to. But I found it very strange
Thanks in advance
| |
| d'Artagnan 2006-11-30, 7:29 am |
| OK I found the solution. Don't ask how I found it and what's the
scientific explanation of it, it just works in my case 
I had to put in my httpd.conf
RewriteRule ^/(.*)/test\.html$ http://domain-name.com/test.mvc [PT]
instead of
RewriteRule ^(.*)/test\.html$ /test.mvc [L]
..=2E. and it's working like a charm. That way I also made it working with
the backslash.
PS: don't forget to restart the httpd after your edit.
Best regards,
Claudiu (akka d'Artagnan)
d'Artagnan a =E9crit :
> Hello everyone,
>
> Here is my question. I set up small script in my .htaccess file:
>
> RewriteEngine on
> RewriteRule ^(.*)-test\.html$ /test.mvc [L]
>
> In my httpd.conf I have no Rewrite rule and it's a dedicated box with
> Red Hat 7.2 + Apache 1.3.33
>
> Now what's weird is that on a direct link (like navigating on the
> website) it is working, no problem at all. BUT, when I make a GET
> request on the url I have a forbidden message. This is very annoying
> because google will not spider my website.
>
> And second question, does anybody know why Apache 1.3.33 won't let me
> use backslash in my rewrite script? When I use '/' like:
> RewriteRule ^(.*)/test\.html$ /test.mvc [L] I have a forbidden error.
> I think he's thinking that we deal with some directory. It's not
> very annoying because I can change my separator character like I want
> to. But I found it very strange=20
>=20
> Thanks in advance
|
|
|
|
|