How to create a URL which will direct to another domain? - web-services

I have an ecommerce website. I have a help desk website hosted on another domain.
So what I want is to have an URL like this: "http://www.example.com/help" and it will take my customers to my help desk site which is hosted on another domain, let's say http://www.example2.com.
So when someone enters http://www.example.com/help" into their browser's address bar, they are taken to http://www.example2.com"
I think it should be fairly easy to achieve. Please point me in the correct direction.

Somewhere in the HTML of the web page you can paste a link like:
Here you put text you want your customer to see
If you want to redirect the customer to another URL, that question has been asked and answered here: Redirect from an HTML page

If you are using php for http://example.com/help page than you can simple paste following snippet to your help page
<?php header("Location: http://example2.com") ?>
this will redirect your user to example2.com directly!!
or you can use jquery in case you are not using php!!
<script>
$(document).ready(function(){
window.location = "http://example2.com";
});
</script>
Don't forget to add jquery library on header to get jquery working correctly,
hope this helps,
thanks.

Related

How to change redirect link after changing my domain in open cart

i just change my website domain from "mysite.co.in" to "mysite.com" which runs Open cart version 3
now the problem is when a product becomes out of stock and i click notify me, it redirect to my old website urlenter image description here
And this says 404 page not found. how can i change this?
please help thank you.
You can export your database and find/replace your old URL to the new one and then again import it.

How can I append hash to URL Filename Apache Web Server Mod-Rewrite

I have a website that essentially runs based on one page. All other content is loaded dynamically, using HTML5 history and pushstate but the issue is that urls in search appear as www.mysite.com/home.html. I want these urls to be redirected and appear as www.mysite.com/#home.html so that my site content loads correctly. How can I do this?
I don't think it should be very hard but I can't seem to figure it out.
Thank you!

In Django, why does request.get_full_path not allow me to redirect to a dynamic url using href?

I'm struggling to understand why this piece of code doesn't allow me to redirect to another page from an html template using the href parameter. I'm trying to use the current full path of the page, because it's filled with dynamic url values, to create an additional add-on to the url to create a form. For some reason however, when I click on the link on the page, the url changes in the address bar, but the page doesn't redirect or go to the page.
Create New Story
Any help will be gladly appreciated!

Referrer Spoofing in Django

I have been searching internet for some good docs/articles on how to implement referrer spoofing using django or django templates.
The project that we are working right now is a dynamic website, where in we get results from mysql database based on the search done by the user.
I am not getting any idea of how to implement this or know of any packages to do this.
Example:
If the original url in mysql database is http://www.google.com and my website is www.example.com.
The link that I should show is www.example.com/redirect/dfjldfjlsdf which will redirect to google.
Note: I am not posting any code/or what I tried because I am not getting any ideas on how to implement this.
Please help me.
I wrote a redirection script. The steps are:
Setup some url handler.
Setup a view for this handler.
Setup a meta refresh html template.
Metarefresh template will blank the referrer before sending the end user to the target url.
If you want to get an idea, follow this question and the accepted answer: django get complete url in query string

How can I edit my templates in SquareSpace?

I'm hosting my blog in SquareSpace, and I need to add a <Script> tag at the footer of every post.
In the middle of this <Script> tag, I need to replace a value with the permalink for the current post.
So, in my home page, where I'm showing 5 posts, I need this <Script> to show up 5 times, each time with the permalink of the corresponding post inside it.
In wordpress, I can directly edit the HTML of posts, and I can do:
<script type="text/javascript">
var myVar = "<?php the_permalink() ?>";
... more code ...
</script>
How can I do this with SquareSpace?
I haven't found anywhere to edit the templates directly.
Thanks!
Daniel
I'm not exactly sure what you want to do or how to do it in Squarespace but here are a couple tips / resources:
If you login and go to your blog page, then switch to 'Structure Editing Mode' by clicking the cubes icon at the top right of the screen, you can then access the 'Configure this page' button for the blog page. In the configuration settings for the blog you can add the Permalink button to the bottom of every post.
If you login and go to 'Website Configuration' at the top left, then go to 'Website Settings > Code Injection' you can select different areas to edit. You might be able to do what you need here. You may need to upgrade your account to access the particular Code Injection Point you want to edit.
Another option is to just use the code injection point (no account upgrade needed) to apply the script in some way.
A great Squarespace resource is the Developers Forum at http://developers.squarespace.com
I hope this helps!!