Question about .htacess

Status
Not open for further replies.

booter

Member
11
2012
0
0
Hi, I have question about .htacces
Is it possible to hide files from external source? Like othersite.com replace with mysite.com? Or mask somehow?
 
4 comments
check on file ending:
Code:
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh)$"> Order Allow,Deny Deny from all </FilesMatch>
so no one will be able to acces the files ending on htaccess htpasswd, ini, log, sh
chane it accoringly to your settings.

what do you mean by
Like othersite.com replace with mysite.com?
 
ah okay.

try s.th. like this
Code:
<IfModule mod_rewrite.c>   
  RewriteEngine On   
  RewriteCond %{HTTP_HOST} ^otherste.com$    
  RewriteRule (.*)$ http://mysite.com/$1 [R=301,L] 
</IfModule>
this should redirect requests from otherste.com to mysite.com
if i haven't done an error.

but!
this will redirect all requests.
 
@wedge1001,
Shouldn't it be the other way around?

You can't MASK external resources using '.htaccess'. You might wanna look into something like mod_proxy for that.
 
Status
Not open for further replies.
Back
Top