Support » Miscellaneous » Redirects from subdomains

Redirects from subdomains

  • Basically I”m trying to create a mobile version of my blog. I have the main domain with the WordPress main install, but then my subdomain also links to that data with its own theme.

    I’ve run into a problem where the main domain redirects fine, but the permalinks on the subdomain always redirect to sub.domain.com/index.php. When I use basic permalinks it redirects properly, but that’s not how my blog works.

    How can I do both at once? Here are the .htaccess files used by my site.

    Main domain
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} (.*iPod.*¦.*iPhone.*) [NC]
    RewriteRule ^(.*) http://sub.example.com/$1? [R=301,L]

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

  • The topic ‘Redirects from subdomains’ is closed to new replies.
Skip to toolbar