PHP Proxy (Shared Hosting)
Set up blog integration on shared hosting where you can only upload PHP files.
If you're on shared hosting (GoDaddy, Bluehost, Hostinger, etc.) and cannot configure Apache/Nginx directly, you can use a PHP script as a proxy. The script catches /blog requests and forwards them to AEO using cURL. This is the universal fallback that works on any hosting with PHP and cURL enabled.
When to Use This Method
Use the PHP proxy when:
- You're on shared hosting and cannot enable mod_proxy.
- Your hosting provider doesn't allow changes to Apache/Nginx config.
- You only have FTP/SFTP access (no SSH, no server admin panel).
- You want a quick solution without needing hosting provider support.
Create the proxy file
Create a file called blog-proxy.php in your website's root directory (the same folder as your index.php or index.html):
<?php
$path = $_SERVER['REQUEST_URI'];
$target = 'https://aeo.how' . $path;
$ch = curl_init($target);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HEADER => true,
CURLOPT_HTTPHEADER => [
'Host: ' . $_SERVER['HTTP_HOST'],
'X-Forwarded-Host: ' . $_SERVER['HTTP_HOST'],
'X-Forwarded-Proto: https',
],
]);
$response = curl_exec($ch);
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$headers = substr($response, 0, $headerSize);
$body = substr($response, $headerSize);
curl_close($ch);
foreach (explode("\r\n", $headers) as $header) {
if (preg_match('/^(Content-Type|Cache-Control|ETag|Last-Modified):/i', $header)) {
header($header);
}
}
http_response_code($httpCode);
echo $body;Add .htaccess rewrite rules
Create or edit the .htaccess file in the same directory. Add these rules to route /blog requests to your proxy script:
RewriteEngine On
RewriteRule ^blog(/.*)?$ blog-proxy.php [L,QSA]If you're using WordPress, add this BEFORE the # BEGIN WordPress block.
If you're not using WordPress, just add it to your existing .htaccess.
Make sure RewriteEngine On appears only once in your .htaccess. If it's already there, just add the RewriteRule line.
Upload both files
Upload blog-proxy.php and the updated .htaccess to your web root via FTP/SFTP or your hosting's file manager.
Test
Visit yourdomain.com/blog. You should see your AEO blog. If you see a blank page, check that cURL is enabled in your PHP installation (most hosts have it enabled by default).
This method adds slightly more latency than a native server proxy since PHP processes each request. For most blogs, the difference is negligible.
If cURL is disabled on your hosting, contact your hosting provider. It's a standard PHP extension and they can usually enable it.
The PHP proxy script handles all /blog sub-paths automatically (articles, sitemap, RSS feed).