Microsoft
Software
Hardware
Network
Question : Htaccess Redirect Directory on specific host
Hi there,
We use a deployment strategy that uploads the same source to multiple servers, however we have two directories which should be inaccessible on two servers, I want to create a redirect for these directories if someone tries to access them on one of these particular servers.
The logic is:
If request url = example.com/dir1 redirect to homepage
However it needs to allow requests to example2.com/dir1
Is this possible with .htaccess or will I need to use php?
Cheers
Answer : Htaccess Redirect Directory on specific host
It possible e.g.
RewriteEngine On
RewriteCond %{HTTP_HOST} example.com [NC]
RewriteRule ^dir1 /index.html [R=301,L]
Random Solutions
Server Returns 404 Error when publishing through WebDAV
Adding Columns to ASP.Net Gridview Control
How to find out what version of remote OpenSSL server is running?
Hyper V Server & Network Requirements
Problem with Win 7 Pro 32bit unattended setup
Regarding INOTES in Lotus 8.5
How to enable auditing logs on checkpoint firewalls
Export Data to XML File from SQL Database
how to build a query to display -- to a logged in user -- a list of other users with UserRoleID = 5 -- who ALSO live in the same state as the logged in user?
Oracle -- SQL Results ?