Apache rewrite rule working with whitespaces in portal URL
Hello,
we have a portal with several page groups. These are accessed through different virtual hosts in Apache. The rewrite rules look like:
RewriteRule ^/website1(.*)$ /portal/page/portal/website1/$1 [PT]
The problem is, it does not work when there is more than one space in URL (fe.: website1/subpage 1/subpage 2). The result is http error 413.
I guess, it is related to PT flag and escaping URI.
RewriteRule flag B would probably do the trick, but it is available in Apache 2.2 only.
We have tried following, as well:
RewriteMap escapemap int:escape
RewriteRule ^/website1(.*)$ /portal/page/portal/website1/${escapemap:$1} [PT]
That works for any number of spaces! On the other hand side, it does not work for Czech (accented; URI escaped) characters any more. :-(
Does anyone have a working rewrite rule? Any hints?
Thank you!
ViNiL
Hi Pratap
Check SAP Note 698329 this note give details for logon fails
U Need to enable SAPGUI for html
goto se80 give internet services (in the drop down box)
Below drop down give SYSTEM publish these service by right clicking system publish--complete service.
and also publish same way WEBGUI
and also enter ur server ip address and hostname in C:\WINDOWS\system32\drivers\etc-->hosts
Hope this helps you.
Regards
Krishna.
Similar Messages
-
Apache Rewrite rule for all backend systems?
Dear all,
Could anyone, write and give me the extact working rewrite rule in apache 2.0 for backend systems like R/3 and BW, ICH.
Paths for bakend systems are as follows.
R/3= http://r3server.compny.domain.com:r3port/sap/bc/gui/sap/its
BW= http://bwserver.compny.domain.com:bwport/sap/bw/BEx
(SSL configured in ICH)
ICH=http://ichserver.compny.domain.com:ichport/sap/bc/bsp
Kindly provide the above rules
Rgds
PRadeepDear all,
Could anyone, write and give me the extact working rewrite rule in apache 2.0 for backend systems like R/3 and BW, ICH.
Paths for bakend systems are as follows.
R/3= http://r3server.compny.domain.com:r3port/sap/bc/gui/sap/its
BW= http://bwserver.compny.domain.com:bwport/sap/bw/BEx
(SSL configured in ICH)
ICH=http://ichserver.compny.domain.com:ichport/sap/bc/bsp
Kindly provide the above rules
Rgds
PRadeep -
Which webservices work with a Weblogic Portal??
Good morning
JAX-WS (wsdl) or JAX-RS (rest) works properly with a Weblogic Portal?- If that app supports TV out,the app description will say, then you need a 4G or later iPod and the HDMI/Digital adopter cable. You can also use and Apple TV abd Airplay to the Apple TV
- If the app does not suport TV out then you need a 5G iPod since the 5G will mirror the iPpd's screen, Yu then need
- Via Airplay to an Apple TV.
or this cable.
- http://store.apple.com/us/product/MD826ZM/A/lightning-digital-av-adapter?fnode=3 a -
Does Apache Virtual Hosting work with localhost?
I'm a newbie trying to learn how apache web server works. I've activated apache web server on my Mac PowerBook G4, and tweaked the config file to get PHP, SSI and CGI working.
If I type the url http://127.0.0.1/ I get the same page as http://localhost/
If localhost is the domain name for the address 127.0.0.1, can I assign other domain names to 127.0.0.1 using apache's virtual hosting?
Ti Powerbook G4 Mac OS X (10.4.4)localhost is defined as 127.0.0.1. You can use them interchangeably.
As for virtual hosts, sure. Apache doesn't care.
There are two ways of running virtual hosts.
Port-based virtual hosts use a port number other than the standard 80. They can be accessed via something like http://localhost:8000/
Name-based virtual hosts look at the hostname header in the request to work out which site to serve. You can run any number of sites on the same port number this way, but you need to be able to control DNS so that it points to your machine.
If you are just testing this locally you can edit /etc/hosts to add whatever hostnames you like;
127.0.0.1 localhost my.testsite.com me.mydomain.com
Now when you enter 'my.testsite.com' or 'my.mydomain.com' in your web browser, /etc/hosts will resolve this to 127.0.0.1 and you'll talk to your local apache server.
Note that the localhost entries don't have to be in your domain. You can use this to override any real hostname you like.
Of course, if you want remote users to access this site you'll need to setup something in the DNS, or edit their /etc/hosts files individually. -
Content rule works with no redundant-vips configured
Hello,
We have a content rule configured (VIP address 10.1.2.3) but have not configured an ip redundant-vip 1 10.1.2.3 under the circuit configuration on either the master or backup CSS.
This content rule works though ? Why is this ?
cheers,
Mikeboth css are responding to arp request for this vip, but luckily the upstream router keeps using the csm mac/css.
I would still recommend to use the redundant-vip.
G. -
302 Redirect Location Header Rewrite not working with code upgrade
Hi,
Description:
We have a portal webservice hosted by an ACE4710. It has two services (www/https) on the same IP 10.1.1.1.
One is a redirect service that redirects all requests to tcp/80 on this ip to the other which is a 'standard' https proxy service.
The backend servers are http only. Externally everything needs to be https.
So we have an ssl proxy and Location header http to https rewrite on the https service.
The configuration below operates correctly on v5_1_2.
But with a code upgrade to 5_3_1b, the Location header rewrite does not work.
We've tried several different configurations and even 'ssl url location rewrite ".*". It just looks like the ACE is completely ignoring the configuration to rewrite the Location field.
Reverting to the older code fixes the problem.
Problem seen:
Here is the problem as seen on the *client*. The 302 redirect Location header is NOT rewritten:
Response headers:
HTTP/1.1 302 FOUND
Server: nginx
Date: Fri, 20 Mar 2015 10:59:43 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 295
Connection: keep-alive
Location: http://website.liveportal.nhs.uk/homepage/information
Cache-Control: no-cache, no-store
Set-Cookie: information=35a7831d-928d-4122-aef3-39ef48ac4440; Path=/; secure; HttpOnly
X-Frame-Options: DENY
HTTPSampleResult fields:
ContentType: text/html; charset=utf-8
DataEncoding: utf-8
Config extract:
1) Set up the servers (4 normal on tcp/80 and one for a redirect)
rserver host WEBSERVICE-1
ip address 192.168.1.1
conn-limit max 200000 min 160000
inservice
...and the same for the other three
rserver redirect PORTAL_REDIRECT
webhost-redirection https://%h/%p 302
inservice
2) Set up the server farms
serverfarm host PORTAL_LIVE
probe webping
rserver WEBSERVICE-1 80
inservice
rserver WEBSERVICE-2 80
inservice
rserver WEBSERVICE-3 80
inservice
rserver WEBSERVICE-4 80
inservice
serverfarm redirect PORTAL_HTTP_REDIRECT
rserver PORTAL_REDIRECT
inservice
3) Setup the ssl proxy and a location rewrite to https for responses from the servers
action-list type modify http HTTPS_LOCATION
header rewrite response Location header-value "http://(.*)" replace "https://%1"
ssl-proxy service WEB_SSL_PROXY
key webportal.key
cert webportal.crt
chaingroup root-chain
ssl advanced-options SSL-SECURE-STRONG-WEB
4) Set up the L4 services
class-map match-all PORTAL_HTTP
2 match virtual-address 10.1.1.1 tcp eq www
class-map match-all PORTAL_SSL
2 match virtual-address 10.1.1.1 tcp eq https
5) Setup the policy maps - one for the reals servers with header rewrite for redirects
policy-map type loadbalance http first-match PORTAL_HTTP
class class-default
serverfarm PORTAL_HTTP_REDIRECT
policy-map type loadbalance http first-match PORTAL_SSL
class class-default
serverfarm PORTAL_LIVE
action HTTPS_LOCATION
6) Create the service policy
policy-map multi-match EXTERNAL-SERVICES
class PORTAL_SSL
loadbalance vip inservice
loadbalance policy PORTAL_SSL
loadbalance vip icmp-reply
appl-parameter http advanced-options PARAM-HTTP
ssl-proxy server WEB_SSL_PROXY
class PORTAL_HTTP
loadbalance vip inservice
loadbalance policy PORTAL_HTTP
loadbalance vip icmp-reply
7) Apply to the interface
interface vlan 211
description External Access
ip address x.x.x.x 255.255.255.0
alias x.x.x.x 255.255.255.0
peer ip address x.x.x.x 255.255.255.0
access-group input PERMIT-ALL
service-policy input EXTERNAL-SERVICES
no shutdownI found that the v5_3_1b code seems to need a bit of extra configuration and it now works ok.
parameter-map type http PARAM_HTTP
header modify per-request
no persistence-rebalance
case-insensitive -
Configuring Apache/OC4J to work with AJP protocol
I understand that with version 2 of the iAS mod_oc4j is incorporated into the
web server and mod_oc4j uses the APJ protocol to have requests to OC4J made on
port 80. It will take some time and planning before we can upgrade to version
2. Has anyone found a way to configure our present versions of iAS 1.0.2 and OC4J to use the
APJ protocol to have OC4J requests made on port 80???Hi J.A.M
This sort of relates to the issue about 500 Internal Error you answered in the other thread. Turns out the there was something wrong with java because I couldn't Javac compile at all from command prompt on a normal Java file (hence BI couldn't either). Which is why I tried to reinstall it.
After installation, I rebooted the machine few times (which in turn would have rebooted everything else).
Running javac on command prompt works, and so does BI Java Host.
Only OC4J is mucking up. Obviously it's not hooked on properly to the new JDK because it was working somehow with the previous (faulty) JDK.
I tried going into C:\OracleBI\oc4j_bi\bin folder (via cmd) and ran "oc4j.cmd -start".
You are right, showed me the error message which I couldn't see earlier. The message was:
"please make sure the JAVA_HOME environment variable is define correctly."
So I configured the JAVA_HOME to point to the new JDK, rebooted the machine. Ran it again.
It still asks me to define JAVA_HOME correctly.
Edited by: AI on Nov 21, 2011 6:43 PM -
How to Start working with TREX in Portal
HI SDN Memeber,
I am very new to TREX please any body could send the how can i start using TREX in portal. if you provide the Document that will be apprisiatable. it very urget
Thanks in ADV
Regards,
Sureshbabu MHi Sureshbabu,
Here are a couple of places you can look for TREX information (either installation or configuration):
- [SAP Marketplace - TREX Installation Guide|http://service.sap.com/instguides]
- [SAP Help - TREX Configuration |http://help.sap.com/saphelp_nw70/helpdata/EN/47/1b074063616446e10000000a114a6b/frameset.htm]
- [SAP Help - Indexing Portal Content|http://help.sap.com/saphelp_nw70/helpdata/EN/46/9d1405fa743ef0e10000000a1553f7/frameset.htm]
Hope this helps.
Best Regards,
Joseph -
URL-rewriting not working with redirect/
I couldn't find an answer to the following problem in any of the threads:
When navigating between pages via internal forwards, I can safely turn off cookies in my browser; the session id will be written into the requested URL, and so session state is being maintained properly. But when I use <redirect/> in a navigation rule in faces-config.xml to force Faces to redirect the request to the target page via an HTTP redirect, the URL is not being rewritten properly - the session id is missing, and so session state is not being maintained. This results in the loss of all user/session specific data for the current browser session.
I suspect that using <redirect/> results in the Faces Lifecycle being terminated by calling responseComplete() before rendering the view, and that at this point, instead of calling encodeRedirectURL() before redirecting, the URL is being redirected without being rewritten to contain the session id.
My question thus are: Is my suspicion correct? And is there any solution to this problem?What I forgot to mention: I'm using Sun's RI of JSF running on Tomcat 5.0.19.
Any help is appreciated!
Wolfgang -
hi guyz
Can the tab panel be broken down into two lines? or alternatively can we break the text on particular tab so it can be displayed in two lines?
If I add 10 tabs, it gives me too much horizontal scrolling.
quick replies appreciated.
thanxYou could always uses images instead of text for your tabs which would allow you to have more control over the tab size.
-
(OT) Incompatible Apache Mod-Rewrite Rules
The following Apache mod-rewrite rule works:
RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
It displays URL's like mysite/About/Webmaster and
mysite/About/Search.
I've finally figured out how to apply a mod-rewrite rule to
my site's
home page...
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
It displays URL's like mysite/Arizona and mysite/Africa.
But when I combine them...
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
The first rewrite rule appears to knock the second rule out
of action.
Does anyone know how to modify either rewrite rule to make
them compatible?
Thanks.On 4/26/06 8:52 AM, "David Blomstrom" wrote:
> The following Apache mod-rewrite rule works:
>
> RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
>
> It displays URL's like mysite/About/Webmaster and
mysite/About/Search.
>
> I've finally figured out how to apply a mod-rewrite rule
to my site's
> home page...
>
> RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1
[L]
>
> It displays URL's like mysite/Arizona and mysite/Africa.
>
> But when I combine them...
>
> RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1
[L]
> RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
>
> The first rewrite rule appears to knock the second rule
out of action.
> Does anyone know how to modify either rewrite rule to
make them compatible?
>
> Thanks.
I'm not an expert on mod_rewrite, but you might be able to
get what you want
simply by reversing the order of the rules:
RewriteRule ^About/([a-zA-Z0-9_/-]+)/?$
About/index.php?bout=$1 [L]
RewriteRule ^/?([-a-zA-Z0-9_/]+)/?$ /index.php?home=$1 [L]
In theory, that should redirect your /About pages, and the
[L] tells Apache
not to parse any more rewrite rules, so the first rule (which
looks like it
simply redirects *everything*) wouldn't come into play.
There's something about times when Apache still parses
rewrite rules even
after the [L] flag, though, so that might not work. Why don't
you see if
that works, and if it doesn't, we can look at it further.
Sonjay -
Sender rewriting rule not working
Hi,
I am unable to make may sender rewriting rules working. The recipient rewriting rules works ok.
I want to change the reply address that shows up in the destination email. For example, if i am sending from [email protected] (via Oracle webmail)i want to make the destination see [email protected] as a reply address.
i ve tried everything, but without success.
An example of sender rewriting rule:
$*@cm-lisboa.net, $[email protected]
Regards,
Luis NevesHi,
Could you give us more details about : your coding, input sample when error is raised ?
That'd help a lot
Chris -
I am using portal 10.1.4, and am trying to get my url to display as www.domain.ca. However, it currently displays as: www.domain.ca/portal/page/portal/PageGroup
I am unable to get my rewrite rule to to remove the PageGroup name from the url and leave nothing in it's place.
I have tried to set my URL Rewriterule in portal as:
Search Pattern: /portal/page/portal/PageGroup
Replace Pattern: /
and my apache rule as:
RewriteRule ^/(.*)$ /portal/page/portal/PageGroup$1 [PT]
However, this setup gives me an error, and the portal pages do not display. What should I put for my rules so that that i can get rid of the extra parts of the url?Hey Chris,
In this example the name of the page group is "www":
Our rewrite rule is also set up in a virtual host section of the httpd.conf file as well so some of the options may not be required for your set up:
RewriteEngine on
RewriteOptions inherit
RewriteCond %{REQUEST_URI} !^/(portal|pls|images).*$
RewriteRule ^(.+) /portal/page/portal/www$1 [PT]
The rewrite condition allows us to ignore the rewrite for certain items in the path. This allows the portal navigator to work. There may be a couple more items that need to be added to the condition because I recently noticed that the help pages dont function properly.
In the portal configuration for the rewrite rule we specify:
Search pattern: /portal/page/portal/www
Replace pattern:
Thats right, the replace pattern is blank.
To see it in action check out http://www.sagelogix.com
-sean
Solutions Architect
www.sagelogix.com -
Gitweb/Lighttpd rewrite rules
I can't figure out how to setup lighttpd's rewrite rules to allow the human-readable urls for gitweb ($feature{'pathinfo'}{'default'} = [1]; in gitweb.conf). I found these Apache rewrite rules, but I'm stuck how to get it working with lighttpd.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* /gitweb.cgi/$0 [L,PT]
By the way, I just updated the wiki with the lighttpd configuration for using gitweb.
Any ideas?
Thanks!
Scott
Last edited by firecat53 (2010-10-24 20:39:05)Any ideas on this?
Thanks!
Scott -
URL Rewrite Rules in 10.1.4
Hi,
I am having some trouble rewriting the urls, I can't make it work ...
What I want is to change the url:
http://www.mycompany.com/portal/page/portal/portal_sverige/
to
http://www.mycompany.com/sverige
Where "portal_sverige" is the page group.
What I did was:
Configure the properties in the page group:
Search pattern: /portal/page/portal/portal_sweden/
Replace pattern: /sweden/
And I went to enterprise manager, MT, http server, administration, advanced server properties, httpd.conf, and put in the lines:
RewriteEngine On
RewriteRule ^/sweden/(.*)$/portal/page/portal/portal_sweden/$1 [PT]
However, when I try to use navigator to edit a page in that group, I get:
http://www.mycompany.com/sweden/pagename?_mode=16
Returns:
Object not found. (WWC-50003)
And just typing in www.mycompany.com/sweden returns 404 error instead of the root page as I would have liked.
Any ideas about what to do? I can't really find any information ... is the change made in the MT ? IM ? Do I have to do it in some specific order? Is the syntax wrong?
Appreciate any help, thanksHello Sayeeas,
I posted an answer to this question a couple months back... check out the thread
Re: Portal URL Rewrite
Here is the answer:
In this example the name of the page group is "www":
Our rewrite rule is also set up in a virtual host section of the httpd.conf file as well so some of the options may not be required for your set up:
RewriteEngine on
RewriteOptions inherit
RewriteCond %{REQUEST_URI} !^/(portal|pls|images).*$
RewriteRule ^(.+) /portal/page/portal/www$1 [PT]
The rewrite condition allows us to ignore the rewrite for certain items in the path. This allows the portal navigator to work. There may be a couple more items that need to be added to the condition because I recently noticed that the help pages dont function properly.
In the portal configuration for the rewrite rule we specify:
Search pattern: /portal/page/portal/www
Replace pattern:
Thats right, the replace pattern is blank.
To see it in action check out http://www.sagelogix.com
-sean
Solutions Architect
http://www.sagelogix.com
Maybe you are looking for
-
IOM firmware update stuck at 66% updating state
Hi, The current firmware is 2.0(1s) and I try to update tot 2.0(4d) since it's prerequisite for 2.1(13). Updating UCS Manager is fine but the IOM is stuck at 66% for two days. I try to reset it and reboot the FI also but it didn't help. Look like I g
-
Dreamweaver CS4 keeps crashing on startup ( fatal error)
I keep getting this fatal error everytime I try to open DW CS4. After hitting ok I get this error message..... Can someone tell me how I can fix this problem?
-
"Requires Internet Explorer 6.0" error message
I'm installing Acrobat 9 Standard on Windows XP. The installation begins and then quickly returns an error message saying the installation requires Internet Explorer 6.0. I'm already running IE 6.0 -- 6.0.2900.2180.xpsp_sp2 What's wrong?!
-
Extra margins when printing double sided
I'm using Word 2007 and have created recipe cards using a basic recipe templete in Word. I have the top margin set to .25 and I'm printing on a regular 8x11 piece of card stock (I want to simply cut the sides and bottom down to make a 4x6 index card)
-
Why are my apps changing when i change the orientation from landscape to portrait
Recently, on my ipad mini retina, when i change the orientation from landscape to portrait, the apps change. For example, when i enter a game like impossible and change to landscape to play it and then exit the screen has shifted to either the right