httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Fulmer" <j...@joedog.org>
Subject Re: [users@httpd] Maintaing the URL when Rewriting
Date Thu, 12 Jul 2007 16:43:32 GMT
What does the error_log say? Post the 404 error.


> This URL is not hitting the action to which the forward is done.
> Its the initaial URL which gets hit from the Appserver.
> The issue here is that the action is not being called with the Rewrite
> Module.
> Aas a result of which I am getting 404 error message.
> The rewrite is not happening at the Apache end.
> Navin
>
>
> On 7/12/07, Robert T Wyatt <robert.wyatt@mail.utexas.edu> wrote:
>>
>> What does the server say about the error? In other words, what is the
>> final URL that is (not) being served?
>>
>> Naveen Sharma wrote:
>> > In this case the URL is getting preserved but action is not getting
>> > called and I am getting 404 Error page.
>> >
>> > Please advice
>> >
>> > Navin
>> >
>> >
>> > On 7/12/07, *Jeff Fulmer* <jeff@joedog.org <mailto:jeff@joedog.org>>
>> wrote:
>> >
>> >     This works for me:
>> >
>> >     RewriteRule ^(.*)-hotels$ /action.php?city=$1
>> >
>> >     http://lisa.joedog.org/pennsylvania-hotels
>> >
>> >
>> >     (Note: I changed action to action.php in order to test...)
>> >
>> >     Jeff
>> >
>> >
>> >
>> >     > I have tried this but this is changing the URL.The initial URL
>> gets
>> >     > modified.
>> >     >
>> >     >
>> >     >
>> >     > On 7/12/07, Martijn <sweetwatergeek@googlemail.com
>> >     <mailto:sweetwatergeek@googlemail.com>> wrote:
>> >     >>
>> >     >> > I have a URL of this form
>> >     >> > http://dev.home.en/hawaii-hotels
>> >     >> > I want to redirect it to
>> >     >> > http://dev.home.en/action?city=hawaii
>> >     <http://dev.home.en/action?city=hawaii>
>> >     >> >
>> >     >> > without actually modifying the
>> >     >> > URL which is(http://dev.home.en/hawaii-hotels).
>> >     >> >
>> >     >> > Please let me know if this can be done using Apache hhpd.conf
>> >     without
>> >     >> > modifying the initial URL.
>> >     >>
>> >     >> RewriteEngine on
>> >     >> RewriteRule /(.*)-hotels$ /action?city=$1
>> >     >>
>> >     >> Should work (though I didn't test it).
>> >     >>
>> >     >> See also, depending on your Apache version:
>> >     >> http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
>> >     >> or
>> >     >> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
>> >     >>
>> >     >> Martijn
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message