apache rewrite rule
how to apply below apache rewrite rule
url/new/onlocation/* url/A/B/en/new/onlocation.html |
Hi,
So you want anything under /new/onlocation/ to be rewritten, so it gives out the /A/B/en/new/onlocation.html page? If that's the case, you can use: Code:
RewriteEngine On |
hi
that what i tried : RewriteRule new/onlocation/(.*) /A/B/en/new/onlocation.html but didn't work if I type in browser http://url/new/onlocation/new/onlocation/ it says 404 page not found: if I type http://url/new/onlocation/new/onlocation/anything.html it takes me to onlocation.html (bit good) but I want to type http://url/new/onlocation/new/onlocation/ this only. and it should take me to onlocation.html page |
Are you sure you have the trailing slash, before the (.*) in the rewrite rule?
Code:
RewriteRule new/onlocation/(.*) /A/B/en/new/onlocation.html |
I have that but some how not working
|
Quote:
|
Quote:
@OP Quote:
Maybe you can try this: Code:
RewriteRule ^new/onlocation([^/]*) /A/B/en/new/onlocation.html |
Quote:
EDIT: sorry; got it -- "Additional path information beyond the matched URL-Path will be appended to the target URL". |
no luck
|
Quote:
|
RewriteRule ^url/new/([a-z]+)$ url/A/B/en/new/$1.html
|
All times are GMT -5. The time now is 01:20 AM. |