You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by r0obin77 <r0...@gmail.com> on 2014/06/14 10:41:44 UTC

mod_rewrite not working in .htaccess.

i am using xampp on windows.For last two days i am trying to rewrite URL's
but mod rewrite is doing nothing.its taking me to the same page.i am trying
to do a simple redirect from foo.html to bar.html as its is a n example
rewrite docs. I have put all the directives in .htaccess.

.htaccess is processing cause adding something like "blah blah blah" in it
results in 500 internal server error. here are lines in my .htaccess file.
*
RewriteEngine On
RewriteRule ^/foo.html /bar.html [R]*

I enabled logging and here is what it is telling me for my last request for
foo.html at trace3.
/
[Sat Jun 14 12:00:49.125000 2014] [rewrite:trace3] [pid 5116:tid 8]   
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] strip
per-dir prefix: D:/x3/htdocs/foo.html -> foo.html

[Sat Jun 14 12:00:49.125000 2014] [rewrite:trace3] [pid 5116:tid 8]
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] applying
pattern '^/foo.html' to uri 'foo.html'

[Sat Jun 14 12:00:49.125000 2014] [rewrite:trace1] [pid 5116:tid 8]
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] pass
through D:/x3/htdocs/foo.html

[Sat Jun 14 12:00:49.531250 2014] [rewrite:trace3] [pid 5116:tid 8]
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] strip
per-dir prefix: D:/x3/htdocs/favicon.ico -> favicon.ico

[Sat Jun 14 12:00:49.531250 2014] [rewrite:trace3] [pid 5116:tid 8]
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] applying
pattern '^/foo.html' to uri 'favicon.ico'

[Sat Jun 14 12:00:49.531250 2014] [rewrite:trace1] [pid 5116:tid 8]
mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
[localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] pass
through D:/x3/htdocs/favicon.ico
/

*Adding same lines into httpd.conf Works*

i hve been using mod_rewrite in .htaccess but never had such problem
before:(





--
View this message in context: http://camel.465427.n5.nabble.com/mod-rewrite-not-working-in-htaccess-tp5752297.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: mod_rewrite not working in .htaccess.

Posted by Christian Müller <ch...@gmail.com>.
Wrong list?

Best,
Christian
Am 14.06.2014 10:42 schrieb "r0obin77" <r0...@gmail.com>:

> i am using xampp on windows.For last two days i am trying to rewrite URL's
> but mod rewrite is doing nothing.its taking me to the same page.i am trying
> to do a simple redirect from foo.html to bar.html as its is a n example
> rewrite docs. I have put all the directives in .htaccess.
>
> .htaccess is processing cause adding something like "blah blah blah" in it
> results in 500 internal server error. here are lines in my .htaccess file.
> *
> RewriteEngine On
> RewriteRule ^/foo.html /bar.html [R]*
>
> I enabled logging and here is what it is telling me for my last request for
> foo.html at trace3.
> /
> [Sat Jun 14 12:00:49.125000 2014] [rewrite:trace3] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] strip
> per-dir prefix: D:/x3/htdocs/foo.html -> foo.html
>
> [Sat Jun 14 12:00:49.125000 2014] [rewrite:trace3] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] applying
> pattern '^/foo.html' to uri 'foo.html'
>
> [Sat Jun 14 12:00:49.125000 2014] [rewrite:trace1] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#9dd270/initial] [perdir D:/x3/htdocs/] pass
> through D:/x3/htdocs/foo.html
>
> [Sat Jun 14 12:00:49.531250 2014] [rewrite:trace3] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] strip
> per-dir prefix: D:/x3/htdocs/favicon.ico -> favicon.ico
>
> [Sat Jun 14 12:00:49.531250 2014] [rewrite:trace3] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] applying
> pattern '^/foo.html' to uri 'favicon.ico'
>
> [Sat Jun 14 12:00:49.531250 2014] [rewrite:trace1] [pid 5116:tid 8]
> mod_rewrite.c(475): [client 127.0.0.1:4656] 127.0.0.1 - -
> [localhost/sid#9006d0][rid#55020a8/initial] [perdir D:/x3/htdocs/] pass
> through D:/x3/htdocs/favicon.ico
> /
>
> *Adding same lines into httpd.conf Works*
>
> i hve been using mod_rewrite in .htaccess but never had such problem
> before:(
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/mod-rewrite-not-working-in-htaccess-tp5752297.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>