Hi,
I've got a site which Google is indexing 3 different ways:
glassgiant.com
host5.veoweb.ne t/~glassgia
veodns.com/glassgia
I only want people accessing it the first way. If they access it any
way but through the domain, I would like to send a moved permanently
code, or at least use a header("Locatio n: blah blah blah").
Unfortunately, I can't figure out how to detect anything before the
first slash in the URL. Any suggestions?
Thanks,
Shawn
--
Shawn Wilson sh***@glassgian t.com http://www.glassgiant.com 2 5685
Shawn Wilson wrote: Hi,
I've got a site which Google is indexing 3 different ways: glassgiant.com host5.veoweb.ne t/~glassgia veodns.com/glassgia
I only want people accessing it the first way. If they access it any way but through the domain, I would like to send a moved permanently code, or at least use a header("Locatio n: blah blah blah"). Unfortunately, I can't figure out how to detect anything before the first slash in the URL. Any suggestions?
If you have access to mod_rewrite on your server, create a .htacccess
file with the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.glassgian t\.com [NC]
RewriteRule ^/~glassgia(.*) http://www.glassgiant. com$1 [R=301]
RewriteCond %{HTTP_HOST} ^ www.veodns.com [NC]
RewriteRule ^/glassgia(.*) http://www.glassgiant. com$1 [R=301]
This would send a status code of 301 (moved permanently), and redirect
the request.
HTH
--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
<?php
// the name of the host => http://$host_name/bla/bla/index.php
$host_name = $_SERVER['HTTP_HOST'];
// if we don't find glassgiant.com in the host_name, we redirect
if(!ereg("glass giant.com",$hos t_name))
header("Locatio n: http://glassgiant.com" );
?>
Shawn Wilson <sh***@glassgia nt.com> wrote in message news:<3F******* ********@glassg iant.com>... Hi,
I've got a site which Google is indexing 3 different ways: glassgiant.com host5.veoweb.ne t/~glassgia veodns.com/glassgia
I only want people accessing it the first way. If they access it any way but through the domain, I would like to send a moved permanently code, or at least use a header("Locatio n: blah blah blah"). Unfortunately, I can't figure out how to detect anything before the first slash in the URL. Any suggestions?
Thanks, Shawn This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jach |
last post by:
How can I get the domain, username and PC network name (Win 2000 Pro & Win
XP Pro PC's) of the current logged on user (logged onto a domain and access
an intranet page, Window 2000 server running IIS) and put this automatically
in a textbox in an webpage. Can this be done with asp & VB?
I basically want to automatically populate a username field with the users
logon so the do not need to type it themselves, leading to type errors.
...
|
by: Daniel |
last post by:
If i log into my computer as domain A and user X and password Y but then I
need to give C# application access to domain B as user F and password G. Is
this possible? or do i have to log into the computer as domain B, user F and
password G in order for the application to have permissions to domain B? I
would like to stay logged in as domain A but just give my C# application
access to domain B. In my application I need file system access that...
|
by: Buddy Ackerman |
last post by:
I have an application where the client wants AD integration. The application requires that the user accounts reside in
the app's database. The application is a (.NET) webservices based app where the desktop client polls a webservice to
return info to the user. The client wants to only manage accounts via the AD. So if they create a new AD user then the
app should automatically create a user in the app database. This is not such a problem...
|
by: Svend Tofte |
last post by:
Hey,
I'm doing some webapplications, and in one of them, I want to open a
page, from another domain. This is running internally, with full
control over the enviroment. However, even adding the two domains in
question to the trusted sites list will not let anything work.
I looked through the security settings for IE, and I don't see anything
in there that seems pertinent, except for the "data sources" one, which
I suspect is that IE4...
|
by: Baron |
last post by:
an asp.net page on Machine A is trying to access files on several machines
of different domains..
any 'good' method to do it without mapping drive in prior.....
i've read something called impersonate; but it use PInvoke, which I don't
like using personally
any good solution?
thanks!!!
| |
by: musosdev |
last post by:
Hi guys
I've got the following error on a project which is running locally on a
vs2005 machine (built in webserver), trying to connect to my win2k3 server
active directory.
the error is...
System.SystemException: The trust relationship between this workstation and
the primary domain failed.
|
by: yawnmoth |
last post by:
If running off of the local filesystem, in Firefox, or if the security
settings are set appropriately, in Internet Exporer, XmlHttpRequests
can be sent to any domain of your chosing. But what about cookies?
Can cookies be accessed for any domain of your chosing?
For example, although www.domaina.tld can't access cookies for
www.domainb.tld, can c:\ access cookies for www.domainb.tld?
The way cookies are accessed in javascript...
|
by: Oren |
last post by:
Hello,
I tried to get UserName and Domain by doing:
System.Collections.Specialized.NameValueCollection var =
Request.ServerVariables;
string sLogonUserArr = var.ToString().Split('\\');
It's not working at the Global.asax file in the events:
Application_Start, Application_End, Application_Error, Session_Start,
Session_End
|
by: Tessa |
last post by:
Hi,
We have a .net web application, and are trying to use
PrinterSettings.InstalledPrinters to list the printers installed on the
webserver. (Windows 2003 server R2, IIS 6, .net framework 2.0.)
The printers installed on the web server under the account used by asp.net
for this web application are network printers that are shared by other
computers that are on our domain. Permission has been granted for everyone
to print to them.
The...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |