Mobile app version of vmapp.org
Login or Join
Ogunnowo487

: 301 Redirect in the body? This may be a silly question, but if I only have access to edit a website through a CMS, and can't touch the headers, is there a way to redirect the page without

@Ogunnowo487

Posted in: #301Redirect

This may be a silly question, but if I only have access to edit a website through a CMS, and can't touch the headers, is there a way to redirect the page without prompting the user to click a link?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo487

2 Comments

Sorted by latest first Latest Oldest Best

 

@YK1175434

Depends what is the objective.

If it is a permanent, it is better creating a .htaccess file with

Redirect /what some.tld/where

10% popularity Vote Up Vote Down


 

@Sarah324

You can use JavaScript to redirect them with code in the <body> of the page. It won't be a 301 redirect, however, as you can only do that with HTTP headers.

<script type="text/javascript">
window.location = "http://www.example.com/"
</script>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme