.htaccess for wildcard DNS Help
Posted: Sat May 03, 2008 1:27 pm
Here is my current .htaccess:
Can anyone see why that is failing to process requests? It's uploaded to /public_html/ and it's not helping any.
Edit: FYI: It's a 500 server error.
Code: Select all
# Rewrite <subdomain>.example.com/<path> to example.com/<subdomain>/<path>
RewriteEngine On
# Skip rewrite if no hostname or if subdomain is www
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
# Extract (required) subdomain (%1), and first path element (%3), discard port number if present (%2)
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.information-now\.net(:80)?<>/([^/]*) [NC]
# Rewrite only when subdomain not equal to first path element (prevents mod_rewrite recursion)
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
# Rewrite to /subdomain/path
RewriteRule ^(.*) /%1/$1 [L]Edit: FYI: It's a 500 server error.