I have tried to figure this out for myself, with no luck. I just don’t use .htaccess enough to learn all about mod rewrites. I went through this Apache help (http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html), but still need your help.
Congratulations on finding the correct Apache module to use for something so simple! I’m not sure how you got to using a mod_alias redirection by looking at mod_rewrite’s guide but it worked!
Well, almost. You don’t need to use a RedirectMatch as that just gets the regex engine involved. Just get into thegolfstationfit.com’s DocumentRoot and use Redirect 301 / http://thegolfstation.retailtribe.com/. The Redirect will retain the path/file for the redirection (and the query string is not affected at all).
Adding the pro/Default.aspx is something that the WinDoze box is doing. I don’t understand why the DocumentRoot request is redirected to the pro subdirectory but it’s safe to assume that Default.aspx is the equivalent of Apache’s DirectoryIndex directive (which you can hide with Apache).
I’ve cleared my cache and uploaded the file to my root folder (/nfs/WWW_pages/mbkeller/thegolfstationfit.com). A screenshot of the directory is attached.
I don’t believe that // is an acceptable way to comment the .htaccess file while I know that # and ; are often used.
PLEASE CONFIRM that you’re using an Apache web server (which version would also be a help). After all, aspx files are generally ONLY acceptable on M$ servers.
Correct, .htaccess (on an Apache server) is read for EVERY request so, if updated, the update is immediately in effect. Where’s the
Options -Indexes
That, in the server and virtualhost configuration file OR the .htaccess file, will prevent Apache from displaying the directory listing.