KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
It is always preferred on a personal website to use relative paths in anchors so that you can easily move your directory structure to a new website, but I want to make part of my website password protected (using .htaccess) and hence use https. Is there a way in an anchor's href to specify a different protocol without hard-coding the www.domain.com as well? Example: <a href="/student/example">Link</a> I want to turn it into something like: <a href="https: /student/example">Link</a> The above obviously doesn't work. Is there any way to do it? I am trying to avoid any scripting but would appreciate a JavaScript more than PHP or ASP.
Tags (comma-separated)
Save Edits
Cancel