WordPress.org

Support

Support » How-To and Troubleshooting » Wildcard subdomains have been set up but it's giving off error 404

Wildcard subdomains have been set up but it's giving off error 404

  • I’ve set up the DNS entry

    *.reviews.softpip.com. 14400 IN A 67.212.175.29

    and added the subdomain in cPanel as such:

    View post on imgur.com

    .htaccess (in /public_html/reviews/) contents:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^([a-z0-9][a-z0-9_\-]*[a-z0-9])\.reviews\.softpip\.com$ [NC]
    RewriteRule ^(.*)$ index.php?pagename=%1 [L,QSA]
    </IfModule>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    Options +FollowSymLinks
    Options +Indexes
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    What I’ve tried to to is (silently, without changing the displayed URL) rewrite SUBDOMAIN.reviews.softpip.com to reviews.softpip.com/index.php?pagename=SUBDOMAIN (as using permalinks has failed since they’re not real directories)

    However, it’s just giving off a 404 error.

    I’ve added this to the footer of the theme, to check:

    <!– <?php echo $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”] . “?” . http_build_query($_GET); ?> –>

    The output is “hello-world.reviews.softpip.com/?pagename=hello-world”.

    Going to http://testing.reviews.softpip.com/index.php works fine with my rewrite cote in the .htaccess file removed (meaning it just rewrites to the main page)

    Where did I mess up?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Wildcard subdomains have been set up but it's giving off error 404’ is closed to new replies.