This is a discussion on Removing port-# from url within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all First, the problem: We are doing a site that's running on Oracle 10.1.2.0 and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all
First, the problem: We are doing a site that's running on Oracle 10.1.2.0 and for some odd reason, relative links on that site, always adds the server port (80) to the url. (More precisely, the port isn't added to the link itself, but after clicking a relative url, the resulting page suddenly has the port-number in it.) Anyway that wouldn't normally be a huge problem, but since we are using Google Maps, the Google Map api key no longer matches the url, and our poor users gets a javascript alert-box that states that the google map key isn't valid for that url. (It only happens on the Safari browser, btw, but still) I'm struggling with mod_rewrite to find a way to remove that port- number from the url. How can I rewrite mysite.com:80/yadda/ to mysite.com/yadda/? Big thanks in advance! Martin |
|
|||
|
"Martin Stender" <stenderdk@gmail.com> schreef in bericht
news:6401f842-3f42-449f-b808-1bc75cd3fda7@b1g2000hsg.googlegroups.com... > First, the problem: > We are doing a site that's running on Oracle 10.1.2.0 ... Assuming the application server, being apache with a tweaked config. > ... and for some odd > reason, relative links on that site, always adds the server port (80) > to the url. (More precisely, the port isn't added to the link itself, > but after clicking a relative url, the resulting page suddenly has the > port-number in it.) That is clicking <a href="nextpage.html"> makes the address bar show http:/site.domain.tld:80/path/of/referer/nextpage.html ?? > Anyway that wouldn't normally be a huge problem, but since we are > using Google Maps, the Google Map api key no longer matches the url, > and our poor users gets a javascript alert-box that states that the > google map key isn't valid for that url. > (It only happens on the Safari browser, btw, but still) Cannot reproduce this using SafariForWindows 3.04 (523.25). Is the :80 added *only* for your site on OracleAS ?? > I'm struggling with mod_rewrite to find a way to remove that port- > number from the url. > How can I rewrite mysite.com:80/yadda/ to mysite.com/yadda/? Try rewritecond %{REQUEST_URI} :80/ rewriterule (/yadda.*) http://%{HTTP_HOST}/$1 [QSA,L] Combined with the true cause it may result in an endless loop of redirects .... Rather scrub OracleAS config for any :80 following some Proxy* directive. HansH |
|
|||
|
Thank you for your response - unfortunately, I didn't have much luck
with it. (Btw the 'yadda' was just meant to be 'anything-after-the- first-slash ... :-). But the url to the site is here: http://tgt.dk If - on Safari on Mac - I click any of the colored buttons at the top for example (guide/inspiration/ticket) I get the port into the url ... it's very strange ... Best regards Martin |
|
|||
|
"Martin Stender" <stenderdk@gmail.com> schreef in bericht
news:69840274-b6e3-41ea-9c21-8242d94fde9f@n77g2000hse.googlegroups.com... > Thank you for your response - unfortunately, I didn't have much luck > with it. (Btw the 'yadda' was just meant to be 'anything-after-the- > first-slash ... :-). Could have been 'something' for first folder ... > But the url to the site is here: http://tgt.dk > > If - on Safari on Mac - I click any of the colored buttons at the top Same for Safari-on-Windows ... > for example (guide/inspiration/ticket) I get the port into the url ... > it's very strange ... Using FireFox with liveHTTPheader-add-on I can see OracleAS doing some odd redirect introducing the :80. GET /ticket/fly HTTP/1.1 Host: tgt.dk Cookie: ... HTTP/1.x 301 Moved Permanently Location: http://tgt.dk:80/tgt/ticket/fly/ Content-Length: 0 I do not blame Safari for not dropping the *given* value, even if it matches the default.... I just thank others for dropping the redundant information. I may blame Google map for discriminating between the same value given and assumed -and for just relying on a referrer!- Finally I'ld rather blame [your] OracleAS for introducing a redundant and confusing redirect. HansH |
| Thread Tools | |
| Display Modes | |
|
|