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), and set $slug to your own brand slug — the first segment of your platform blog URL (app.aeo.how/{brand_slug}/blog):
<?php
$slug = '{brand_slug}';
$path = parse_url($_SERVER['REQUEST_URI'] ?? '/blog', PHP_URL_PATH);
$target = 'https://app.aeo.how/' . $slug . $path;
if (!empty($_SERVER['QUERY_STRING'])) {
$target .= '?' . $_SERVER['QUERY_STRING'];
}
$ch = curl_init($target);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_HEADER => true,
CURLOPT_ENCODING => '',
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0,
CURLOPT_HTTPHEADER => [
'X-Forwarded-Host: ' . ($_SERVER['HTTP_HOST'] ?? ''),
'X-Forwarded-Proto: https',
'User-Agent: ' . ($_SERVER['HTTP_USER_AGENT'] ?? 'AEO-Blog-Proxy/1.0'),
],
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
curl_close($ch);
http_response_code(502);
exit('Blog temporarily unavailable.');
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = substr($response, 0, $headerSize);
$body = substr($response, $headerSize);
curl_close($ch);
http_response_code($httpCode);
foreach (explode("\r\n", $headers) as $header) {
if (stripos($header, 'Location:') === 0) {
$location = trim(substr($header, 9));
$location = preg_replace('#^https?://app\.aeo\.how#i', '', $location);
$location = str_replace('/' . $slug . '/blog', '/blog', $location);
header('Location: ' . $location, true, $httpCode);
continue;
}
if (preg_match('/^(Content-Type|Cache-Control|ETag|Last-Modified|X-Robots-Tag):/i', $header)) {
header($header);
}
}
echo str_replace('/' . $slug . '/blog', '/blog', $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).
Never add a "Host:" header to the cURL request. cURL derives Host from the target URL (app.aeo.how), which is what AEO expects — a hand-set Host with your own domain is answered with 403.
CURL_HTTP_VERSION_1_0 plus an explicit CURLOPT_TIMEOUT keeps shared-hosting proxies (cPanel, LiteSpeed) from hanging on chunked responses.
This method adds a small latency compared to a native server proxy because PHP handles every request. For most blogs the difference is negligible.
If cURL is disabled on your hosting, contact your provider. It is a standard PHP extension and they can usually enable it for you.
The PHP proxy script automatically handles every /blog sub-path (articles, sitemap, RSS feed).