Page redirects/routing to external pages

Hi,

I am trying to redirect a php page I have create with Wappler to an external page (different domain, different server)

I don’t know what best practice for this.
I have do a manual .htaccess direct, but can this be handle differently and/or with Wappler

For example:
http://www.domain.calm/computers.php redirect to external page http://www.external domain.com/aspecoficpage.php

I am not sure what the aim is. Do you have a link that is clicked on, or do you want an automatic redirect to the other domain?

If the latter is the case, then the first line in the page should read, or similar.

<?php header("location: https://www.external-domain.com/page.php"); ?>

It’s an auto redirect

then the header option is the go.

1 Like

Can any one assist. If I was to use .htaccess redirect, I noticed that Wappler write to that .htaccess file and removes any previously manual entries in the .htaccess.
Is there any way to have Wappler code and manual code co=exist in the .htaccess?

I want to redirect say:
http://www.domain.com/apple to http://a.domain.com/abc/123456

If you’re using FTP you can exclude the file once you upload it.

Can you not just create a “url” redirect within the routing panel rather than doing it separately?

A flow with a browser component looks a good option too!

1 Like

It doesn’t allow you to put in external URLs in the routing page, even though it state ‘URL’ it has to be an internal page

Wappler does not remove the entries in the htaccess.
Most probably the htaccess on your server was not downloaded locally and you overwrote it on the server with the locally created one.
If you have some rules added in your htaccess then download it locally so Wappler can add its rules after the existing ones.

Ahh! That’s correct. That’s exactly what’s happened here. Thanks @Teodore.