Due to some unforeseen reason, I cannot use a *.php extension for my page. And I need to put conditional redirection in the page.
I plan to use *.html, and javascript/Ajax to call a PHP which evaluates the condition
and accordingly sends back a redirection command.
The condition is being evaluated, but how can I give a redirection command from this internal PHP is not clear to me.
You can actually map all your .html files to .php using .htaccess.
If that doesn’t work for you, your logic should be as follows:
PHP:
Javascript with jQuery (assuming you require AJAX to redirect):
Javascript (if you simply serve a static html file)