Uregent | help required

Using a single web hosting account to host multiple sites

Uregent | help required

Postby sam » Sat Aug 23, 2008 4:11 am

Hi,

I have requirement where in

www.abc.com/languagecode/books/

url should redirect to

/nameofcontextpath/viewBook.form ?name=travellbooks

<IfModule mod_rewrite.c>
RewriteEngine on


RewriteRule ^/([A-Za-z]{2})/books/$ /nameofcontextpath/viewBook.form [PT,L]

</IfModule>

when i open new browser window and try to hit the url (www.abc.com/languagecode/books/)
it does not work.
i.e www.abc.com/languagecode/books/
on this hit. It rewrites
www.abc.com/nameofcontextpath/viewBook.form ...and user is able to c the application related path which he should not.
and whole functionality breaks.



However when I hit the same url twice in single internet browser window it works fine.
i.e www.abc.com/languagecode/books/
on this hit.it loads appropiate form.


Can somebody please help me fixing this bug ?


thanks,
Sam[/b]
sam
 
Posts: 5
Joined: Sat Aug 23, 2008 3:34 am

Postby richardk » Sat Aug 23, 2008 9:51 am

So the first time the URL changes from /languagecode/books/ to /nameofcontextpath/viewBook.form but after that it does not?

Do you have any redirects?
Does you application do any redirects (maybe for authentication to set a cookie)?
Does /languagecode/books/ exist?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby sam » Sat Aug 23, 2008 10:26 pm

So the first time the URL changes from /languagecode/books/ to /nameofcontextpath/viewBook.form but after that it does not?

: yes

but my requirement is it should not should show /nameofcontextpath/viewBook.form to user.

Do you have any redirects? :
yes we do have for image path on web server that is apache 2.2.
Does you application do any redirects (maybe for authentication to set a cookie)?
Does /languagecode/books/ exist? it does not exist anywhere except in url rewrite pattern matching.
sam
 
Posts: 5
Joined: Sat Aug 23, 2008 3:34 am

Postby sam » Sat Aug 23, 2008 10:29 pm

Does you application do any redirects (maybe for authentication to set a cookie)? we dont have any other redirects other than image path redirect.
sam
 
Posts: 5
Joined: Sat Aug 23, 2008 3:34 am

Postby richardk » Sun Aug 24, 2008 2:12 pm

The mod_rewrite should not cause a redirect. Can you get a RewriteLog? Add
Code: Select all
RewriteLogLevel 9
RewriteLog /path/to/rewrite.log


Also try rewriting to / instead of /nameofcontextpath/viewBook.form to see if the same problem happens.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 27 guests

cron