I have some standard nested routes in my app, and I want to implement subdomains using the subdomain-fu gem. So I'm currently doing this:
example.com/stores/name_of_store/products/name_of_product
and I want to do this:
name_of_store.example.com/products/name_of_product
There seems to have been some discussion about the failing...
I wrote a php script to stick in my page just before my main stylesheet.
The idea is to split all the background images needed by my page across a few different subdomains so that I can use more than two parallel HTTP requests (latency is horrible from Australia to American hosting).
I know that this requires resolving extra DNS lookup...
My host : 1and1.com
My setup : I have my main domain and a sub domain hosted on the Linux host.
What I need : Sub domain (currently on Linux host) should be pointed to that of a .Net site hosted on MS Business hosting on 1and1. What is the best way of achieving it?
What I did so far : Used Frame redirect (from Sub domain to .Net site)...
Hey there,
I've been using the Zend Framework to map subdomain requests to a module in my main MVC application but now I need to change the virtual host config back and use a htaccess file instead. Previously all I needed to do in the virtual host config was to set the subdomain DocumentRoot to be the document root of the main applicati...
Is it possible to set a cookie for http://www.example.com from a PHP file located at https://secure.example.com? I have some code that was given to me, that appears to try and fails at this. I was wondering if this is possible at all.
...
I recently moved a friends blog onto his new web hosts but unfortunately the images are not working.
This is due to the old host having the following path for images:
http://www.example.com/blog/wp-content/uploads/2009/07/imagename.jpg
The new host uses a different layout and has this path for the file:
http://www.example.com/wp-cont...
Hi!
This is my problem:
I have a JBoss server (Running an existing app) and a Apache Tomcat (Running an app created by me) server running on the same server with different ports.
I have two subdomain names which i have routed to the IP of the server.
What i need to do is to bind the subdomain names to the IP, but with different ports....
Hi,
In my website i have implemented custom session values. In which, on log on i set the session value to some object. This object is used to extract user specific data from db.
now the problem is If user logs in with : test1.somesite.com and logs off and again logs in with: test2.somesite.com that user is still receiving the data fro...
Hi!
I have two subdomains:
test.domain.com
prod.domain.com
I have one server with to urls (two apps):
localhost:8080/app1/
localhost:8090/app2/
The two subdomains are redirected to the server i got.
Using Apache, how do i ProxyPassReverse so that this can happen:
If test.domain.com -> localhost:8080/app1/
If prod.domain.com -> local...
I am putting my php /mysql website up and this is my scenario
The users are grouped into sites each site with their own unique database.
There will be about 40 users per site.
the two options I'm trying to decide between are
have a central website running the php and directing the users off to their own database
using sub domains fo...
I'm trying to write (or just find an existing) PHP method that can take a link and extract the url. The trick is, it needs to hold under the weight of strange looking domains like:
www.champa.kku.ac.th
Looking at this one myself with human eyes, I still guessed it incorrectly: thought the domain would be kku.ac.th but that gives a dn...
What i have currently:
A wildcard dns record. So that every subdomain points to www.galop.gr
A dynamically (php) generated .htacces file where i append the following code for every subdomain i want working:
RewriteCond %{HTTP_HOST} ^fractalbit.galop.gr$ [OR]
RewriteCond %{HTTP_HOST} ^www.fractalbit.galop.gr$
RewriteRule ^/?$ http://ww...
Hi,
I am using rSpec for testing my application. In my application controller I have a method like so:
def set_current_account
@current_account ||= Account.find_by_subdomain(request.subdomains.first)
end
Is it possible to set the request.subdomain in my spec? Maybe in the before block? I am new to rSpec so any advice on this wou...
Here is my current code:
RewriteCond %{HTTP_HOST} !^example\.com [NC]
#RewriteCond %{REQUEST_URI}!^something
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule (.*) something/%1/$1 [QSA,L]
My goal is to rewrite http://*.example.com/whatever to http://example.com/something/*/whatever, assuming * is the same for both and what...
Most examples show how to redirect all subdomain traffic to a primary domain, maintaining the directory structure. I actually don't want this. I want to redirect all subdomain traffic (the site is going away) to the primary domain. This is not working:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/ [...
On my site I have complicated situation and want ask for advice how to do tracking best of all.
On my site I have 2 main high level domains, for example www.domain1.com and www.domain2.com.
They are working with the same app code, just domain names are different.
www.domain1.com is available for public as well as integrated client site...
I'm having trouble with making a subdomain to my Windows computer while using AJP to proxy to Tomcat. This is what I have in my httpd.conf file:
<VirtualHost *:80>
ServerName subdomain.localhost
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / ajp://localhost:8009/folde...
I have configured the wildcard DNS of *.mydomain.com and it's all working properly. My question is which of these should I rely on identifying client subdomain requests?
$_SERVER["HTTP_HOST"]
$_SERVER["SERVER_NAME"]
$_SERVER["SCRIPT_URI"]
They all seem to contain the subdomain part I want but after reading this article by Chris: http...
Like most good developers I have a separate testing environment for my web app. For example, I have www.test.example.com which is the testing site and the production site is www.example.com.
I have set my Base Domain to example.com but how do I set the connect URL so that it goes to my test site when I login from the test site? Do I nee...
Hi, im creating profile pages based on a subdomains using the wildcard DNS setting.
Problem being, if the subdomain is incorrect, I want it to redirect to the same page but without the subdomain infront ie;
if ( preg_match('/^(www\.)?([^.]+)\.domainname\.co.uk$/', $_SERVER['HTTP_HOST'], $match)) {
$DISPLAY_NAME = $match[2];
$query = "...