How can i redirect to anthoer website when i use base tag?

131 Views Asked by At

I am using base tag to keep CSS and JAVASCRIPT when any one doing trailing slash, or write any thing after last slash in url ?

for example my website like this:

http://www.example.com

because i am using base tag so when i redirect any thing its be like this:

http://www.example.com/anything

when i redirect to another website like facebook so its be like this

http://www.example.com/https://www.facebook.com

i want be like this:

https://www.facebook.com

this is my base tag

<base href="http://www.example.com/">

how can i do this ? any help i will be gratefull

1

There are 1 best solutions below

0
On

i found the solution of my question and i want share it with you because you deserve it, it's so simple just put two slash before the URL.

like this:

<a href = "//https://www.facebook.com">facebook</a>

and it works perfectly thank for every one see my question.