I am having a ridiculously difficult time getting an Apache Rewrite rule to function as intended. Wondering if anybody could help me spot the error.
I am trying to rewrite a parked domain to a subfolder on the primary domain without changing the browser address bar url.
RewriteCond %{HTTP_HOST} ^domain-name\.com$ [NC]
RewriteRule ^/?$ /domain-name [L]
I can get the domain to permanently redirect, changing the address bar in the process, but that is not the objective. The rewrite is supposed to function in the same manner as a "pretty permalink" style redirect, such as the way it works when rewriting an SEO pseudo directory structure to a query string url.
What do I need to do to fix this?
I have looked at other solutions on this site and around the web, but none of them corrected my problem.
I am far from an expert in rewriting urls, but usually I can manage.
Ideas?