Portal Engine
Version 2.x > Portal Engine > https url rewriting View modes: 
User avatar
Member
Member
sedonatek - 3/31/2007 9:01:34 AM
   
https url rewriting
We are trying to create a https link in a specific page but the url gets rewritten.

Example

link entered:
https://www.pro-d.us/contact.aspx
on page save url looks like this:
https:///contactus.aspx

I'm guessing this pretty simple? But we don't know how to do this...

User avatar
Member
Member
KellyCS - 3/31/2007 12:23:26 PM
   
RE:https url rewriting
sedonatek,

I tried this two ways, both of which worked (except the browser timed out, presumably because the target page doesn’t exist).

1. In an existing editable text area, I selected a word at random, then clicked the Insert/Edit Link icon in the editor toolbar. For Protocol I selected https://, and for URL entered www.pro-d.us/contact.aspx. This converted the word to a hyper-link.

2. In a page layout I entered:
<a href="https://www.pro-d.us/contact.aspx" target="_blank">some-word</a>.

In both cases, when the link was clicked on the live page, the browser attempted to load the target page.

Is this what you were trying to achieve, but maybes in some other way?

James

P.S. Sorry, the HTML may not display correctly in #2 above - does anyone know how I should enter HTML code in a post?

User avatar
Member
Member
KellyCS - 3/31/2007 12:26:31 PM
   
RE:https url rewriting
Kentico,

The HTML above didn't display correctly in Preview, but did display ok when submitted.

Possible bug?

User avatar
Member
Member
sedonatek - 3/31/2007 3:28:23 PM
   
RE:https url rewriting
Thanks Kelly - this is good but I didn't explain this as well as I should have.

The site url is www.pro-d.us which shows up as pro-d.us in the Site Manager > Edit Site > Site domain name.

When we enter in a link like - <a href="https://www.pro-d.us/contact.aspx" target="_blank">some-word</a> after we click save the url then looks like - <a href="/contact.aspx" target="_blank">some-word</a>

We are guessing this is due to the url rewriting engine but we can't figure out how to turn this off for just this page.

Any more help would be greatly appreciated.

Thanks

User avatar
Member
Member
KellyCS - 3/31/2007 5:52:12 PM
   
RE:https url rewriting
I’m not at your stage yet, as I still have ‘localhost’ in Site Manager > Edit Site > Site domain name.

So, you have a link from one page to another page within the same site. When you save, the url then looks different than when you entered it, but what happens when you click on the link – does it work?

Where I have links from one page to another within the same site, I code them as follows:

<a href="~/contact-us.aspx">Contact Us</a>

Comparing this with your example, the main difference is the Tilde character (~) at the start of the url, which I guess represents the site’s root folder. By using it, you don’t need to enter the http://yourdomain.com part.

In fact, all my main menus in the master page are implemented this way. I first used the Kentico drop-down menu, but it produces a torrent of code. As I didn’t need the drop-down feature, I eventually hand-coded the menus, using this method.

James

User avatar
Member
Member
sedonatek - 3/31/2007 7:10:48 PM
   
RE:https url rewriting
figured it out - we just went into the source of the page and used single quotes around the href='' then the system doesn't rewrite the code - works great - just a little clunky...

Example:
<a href='https://www.pro-d.us/contact.aspx' target="_blank">some-word</a>

Thanks

Bob