How To Redirect Visitors To A Subpage Depending On The Url They Entered
Nov 5, 2007
My client has just purchased hosting (not through my hosting company but one they wanted to use) for their main domain but they also have a number of more specific domains that need to be pointed to a specific page in the website. The trouble is that for these additional the new host say they can only point to the main domain (IP address) at DNS level and not to a specific page.
Any idea how to go about this (apart from using another host!)? Can I use a script that can tell what url they have typed into their browser and forward them to the correct page? I want to avoid the need for a hosting package for each domain just for a simple redirect page!
I have what seems to be a simple redirect question. I have a dedicated server and a few static IP addresses, but I want to make it so if someone were to type in my IP address in their browser, Apache will redirect them to the domain name. (Typing in [url]
What happens now is that if you were to type in my server's IP address, it will show you the FIRST VirtualHost container that's listed in httpd.conf. This is not so bad since I've placed my main company site at the start of the list, but I'd rather redirect the IP into the domain name I use.
I read somewhere that you can place Mod RewriteRules directly in the VirtualHost container rather than using .htaccess, but the few "rules" that I tried didn't seem to do anything. And yes, I restarted Apache each time I edited httpd.conf.
Is there an easy way to do this?
ALSO, is there a way to redirect the name server address too? If you type in [url]into the browser, it acts the same way. I would ultimately like to redirect both the nameservers and the IP address(es) to the domain name.
We have an established site for which we want to add a 'mobile-appropriate' subdomain geared to phone surfers.
Our host (1and1) confirms their servers detect mobile visitors but they couldn't help me with how to read the server flag(?) or whatever and then redirect the server to our mobile subdomain when appropriate.
Can anyone point to an appropriate how2? (Note I don't need "mobile code" help help - just help with how to redirect mobile visitors transparently off our main site and into its mobile subdomain).
I moved my content from www,mysite,com to subdomain,mysite,com. I'd like to direct people who come to my site from search engines to the new location of the content.
For example, if they searched for pink purse and the search result was www,mysite,com/pink_purse,html, when they click that link, I'd like for them to redirected to subdomain,mysite,com/pink_purse.html. Can this be accomplished with some .htaccess magic?
I am using dreamweaver to build our corporate intranet for a company I work for. I created a header.php file for a menu that is completed. Using dreamweaver I entered this code:
<?php include("header.php"); ?>
in the appropriate section of the index.php file. The file name is correct and in the right place. It shows up fine in dreamweaver, but the menu is missing when you view it on the intranet. Please help guys. I have been at this for 2 days now and my boss is waiting for a presentation on this.
I am looking for setup a gateway (reverse proxy I guess?), specifically how to configure Apache to point to different webservers depending on domain name.
I currently have a single webserver running multiple virtual domains all accessible via a single external IP address.
I would like to break this into 2 servers each running multiple virtual domains accessible via gateway with a singe external IP address.
As an example, a single internet IP address points to port 80 on the gateway machine. The gateway machine will determine if its example1.com, example2.com, example3.com or example4.com. If its example1.com or example2.com it will direct internally to webserver1 and if its example3.com or example4.com it will direct internally to webserver2.
Webserver1 and webserver2 each host different websites via virtual hosts.
Is this possible and if so, what is the correct configuration of the gateway machine. I currently have installed apache2 with mod_proxy enabled, but I am struggling with configuring it properly.
I want to add visitors limits for my website. Is any way to i do that ? For example i want only 50 visitors to be the same time on my website and if come more to they get a message the website is full, please come back another time.
I am currently on a shared hosting paying a typical $7/month. The traffic of my website is increasing at a rapid rate and sometime twice or thrice in a month, I get those cpu exceeded errors. I'm running just 4-5 plugins on my website, nothing much and the sponsors ads are hosted on 3rd party sites to reduce the server load.
About my website:
It is a gadget site running on wordpress software with mysql db now exceeding 22MB. My monthly bandwidth goes near 80GB. Currently I get 6000-7000 visitors in a day and I've some future plans which will make it to 10000+ in coming months.
What do you guys say? To go in for VPS or still remain with shared hosting?
If you say that I must go for VPS, then which is the cheapest and most reliable VPS. My budget for my website is upto $20/month
Many ISPs assign dynamic IP addresses and I'm wondering if the following will be a problem for my site if it for example had 5 million all-time unique users:
So if someone new comes to my site with an IP that has already been in use by someone else who visited my site, that user will use the same databases with the previous user and won’t even be considered a unique in user.
Do dynamic ISP given IPs work so that someone else gets that IP once you release it?
I am running a very successful wiki based website that has outgrown our current web host. The site runs very slow because our host says we are hitting the memory limit on the server (currently under a shard hosting plan).
Thousands of visitors per day Ten thousand page views per day (all PHP) 20GB bandwidth per month MySQL database
Is there anyway to determine how many visitors subscribe to an RSS feed? (besides using something like technorati or feedburner) Does anyone know of a log analyzer will do this or another custom solution?
any way to find out how many surfers are on your website simultaneously / concurrently.
i have download site, scripts site and a forum on the same dedicated server using the same domain name. the forum tells me i have xxx number of users online... is there a way to find out how many surfers there are on the download and scripts part of the site?
i tried ps -aux |grep httpd
but it shows significantly lower numbers than i can see on the forum. and i havent added the script and download parts of the site.
I've built an intranet in PHP and configured IIS so it will run as the user that visits the site.
The company then has a fileserver that they wan't to list the files from depending on what rights you have on your user.
I've done the: "Integrated Windows Authenitcation", and removed "Anonymous access" -step.
When I debuged the fileservers logs it says that when I'm logged on from the intranet-webserver it tries to access the fileserver as my user, when I change to another machine it goes for a anonymous-account.
I thought the "Anonymous-access"-checkbox I removed removed that?
I have noticed that the CPU on my VPS maxes out. This occurs when there are many concurrent visitors to any of the 7 domains. 6 of the domains run Wordpress and 1 runs php-bb forum. When I run top during high cpu I see multiple "php-cgi":