Forum Moderators: phranque
[#*$!.domain.com...] ==> [#*$!.domain.com...]
#*$!: any subdomain
yyy: any file in the folder dir
So basically I want to redirect all calls to /dir to / for all subdomains and all files in /dir
Thanks in advance!
[zzz.domain.com...] ==> [zzz.domain.com...]
zzz: any subdomain
yyy: any file in the folder dir
For more information, please review our forum charter [webmasterworld.com].
Jim
RewriteRule ^blogs/(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
If you're on a dedicated server, then HTTP_HOST must be checked to be sure that it is not blank. If you put the code in a server configuration file, such as httpd.conf instead of .htaccess, then the rewriterule pattern must start with a slash. If you put the code into .htaccess in the '/blogs/' subdirectory itself, then you must omit "blogs/" from the rewriterule pattern.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim