• Hi,

    I have WP v1.5-beta installed on a machine I had access to at university. But since I’m now graduated, I no longer have access to the machine, nor can I SSH into it any more.

    I have since acquired a new acount at another host. Now I’d like to redirect all visitors who would stumble upon my old university account to be redirected to my new host.

    Since I can’t access the university machine any more, solutions like changing my .htaccess file won’t work. I do however still have my WP-admin password, and I’m still able to post entries.

    I do still however have my WP-admin password, so I can still post entries. Thus I was thinking, maybe it is possible to make a post, which has embedded in it some redirect code. I tried it with this code, but to no avail.

    Does anyone has some better working code, or other ideas on how to accomplish this?

    Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • This ? https://php.codenewbie.com/articles/php/1526/PHP_Redirect-Page_1.html

    (It can also be done by using a deliberately broken link, but I can’t recall how to do that right now)

    You’ll want to edit your current theme’s main template (through the theme editor) and replace everything in it with what podz links to.

    Thread Starter biogeek

    (@biogeek)

    Maybe I didn’t formulate my question clearly enough, but I can’t edit any templates in the theme editor. I didn’t made the files writeable in the past, and now I don’t have the permission any more to do so.

    The only thing I still can do, is make posts. So I want essentially to make an empty blog, with just one post, containing some redirection code.

    Thanks in advance.

    Hmmmm. If you don’t have write access (and presumably no FTP either?), getting an automatic redirect is going to be difficult[1]. Maybe your single post could just have a link to the new address?

    [1] Though someone might have a better idea

    Thread Starter biogeek

    (@biogeek)

    If you don’t have write access … getting an automatic redirect is going to be difficult

    That’s why I came here in the first place. ??
    My old site has for the moment indeed a simple link to the new adress, but I’d like to minimze the burden as much as possible

    Which version is your “old” site? 1.2 or 1.5? And do you have plugins installed?

    The reason I ask is that to run PHP from within a post, you need to have RunPHP or another similar plugin installed to recognize PHP from within a post. Otherwise, you can’t. So you might be beating a dead horse.

    Right now, the link within the page might be your only way out….but you can use the built-in editor in WordPress to check to see if “any” of your files are CHMOD writable. You never know, you might just be able to get to your base template through there. Worth a try.

    Here is the post you must use:

    [BODY onload=”javascript:window.location=’your.url.com’;”]

    Just substitute the square brackets [] and use angled brackets, <>

    (I didn’t write it directly as it is supposed to be, cuz, this page would get redirected)

    Hope it helps, I tested it, and it worked for me.

    By the way, there’s no need for RunPHP or anything, it’s just pure old browser-grown javascript for you to enjoy. It works cuz most browser interpret tags wherever they are within the HTML file, no matter if it’s mal-formed. This allows you to insert another BODY tag, and most browsers won’t care, and will execute it anyway.

    Ahhh and if it worked for you, post a reply here telling us so (sopeople knows it works – and also feed my self-confidence -, or to find it another solution).

    Thread Starter biogeek

    (@biogeek)

    Rha7com, your Javascript works perfectly! Thanks a lot.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Redirecting from a site where you don’t have (root) access to any more.’ is closed to new replies.