I'm looping over a series of urls and want to clean them up
I currently have the following code
# Parse url to remove http, path and check format
o_url = URI.parse(node.attributes['href'])
# Remove www
new_url = o_url.host.gsub('www.', '').strip
How can I extend this to remove the subdomains that may exist in some urls?
...
Is it possible to redirect all requests to x.domain.com/.* to y.domain.com/.* WITHOUT letting this redirection be visible in the url?
I have unsuccessfully tried several things in .htaccess. Just specifying the [L] flag still shows this redirection in the url (as it does when I use the [R] flag additionally).
EDIT: as somebody claimed ...
I have an app that has is up in a few environments i.e. (development, staging, beta, live)
What's the best way to pass in an app's domain name when sending mail, to allow for different domain names depending on the server?
My first thought is to add something in the respective environment.rb files for each one, so config/environments/b...
I have a classifieds site and I want to know whether creating subdomains or sub-folders is better, as I am in state of confusion.
If we need to take sub-domains then what are the benefits which we can get from sub-domains?
If we need to take sub-folders then what are the benefits we can get from them?
If we create sub-domains then Goo...
I'm struggling to get association right on Grails. Let's say I have two domain classes:
class Engine {
String name
int numberOfCylinders = 4
static constraints = {
name(blank:false, nullable:false)
numberOfCylinders(range:4..8)
}
}
class Car {
int year
String brand
Engine engine = new Engine(...
I need a simple proxy PHP function/script that can download a file from a foreign domain, and also allow me to modify the data (as strings) before retransmit. Any ideas better than "readfile($url)" ??
...
My homepage is located at www.nazgulled.net and I bought a new domain which is www.ricardoamaral.net. Both these domains point to the same exact server.
I'm having two problems with the redirection, my current code is this:
RewriteCond %{HTTP_HOST} ^(www\.)?nazgulled\.net [NC]
RewriteRule ^(.*)$ http://www.ricardoamaral.net/$1 [L]
Fo...
This is simple I hope :)
When I create a new web application in WSS does it need to be on port 80 if I want to point an external domain name at it?
Everything is standard in terms of IIS and ports that are open i.e. port 80 is the only one open.
I am guessing if I let WSS assign a port number to the new web application surely this can...
hello,
I would like to generate a list of URLs for a domain but I would rather save bandwidth by not crawling the domain myself. So is there a way to use existing crawled data?
One solution I thought of would be to do a Yahoo site search, which lets me download the first 1000 results in TSV format. However to get all the records I woul...
I have two different domains that both point to my homepage in the same server.
I want to log every single access made to my homepage and log which domain the user used to access my homepage, how can I do this?
I tried mod_rewrite in Apache and logging to a MySQL database with PHP but all I could do was infinite loops.
Any ideas?
EDI...
Due to weird domain/subdomain cookie issues that I'm getting, I'd like to know how browsers handle cookies. If they do it in different ways, it would also be nice to know the differences.
In other words - when a browser receives a cookie, that cookie MAY have a domain and a path attached to it. Or not, in which case the browser probably...
My computer comes under the ABC domain. Whenver i use the following code to list all the computers under the ABC domain, my machine is not listed. Am I missing out on something ? Kindly help
using System.DirectoryServices;
public void PrintComputersInDomain (string domainName)
{
DirectoryEntry de = new DirectoryEntry ("LDAP://" + ...
If a user navigates to my webpage how can I programmatically determine they are accessing my page from within the Intranet? (Not interested in NTLM or Windows forms authentication. Need a programmatic method.)
...
hello,
how would you extract the domain name from a URL, excluding any subdomains?
My initial simplistic attempt was:
'.'.join(urlparse.urlparse(url).netloc.split('.')[-2:])
This works for http://www.foo.com, but not http://www.foo.com.au.
Is there a way to do this properly without using special knowledge about valid TLDs or country...
Hello everyone,
My development/deployment environment is, IIS + Windows Server 2003/2008 + .Net + VSTS2008 + C#. I have several web sites, each of them has stable and beta version, for example, I have beta version order system and stable version order system, the same as purchase system. I deployed the 4 systems on 4 different physical ...
hi there
i need to connect to two different domains from a single flex application.
the problem is the domain other than the current hosted domain is unable to login.
letz say i hosted the application at LOCAL server. im able to login to the local server .
From the existing application i need a login to the MAIN server too. The problem...
Ok...so ive been wriggling around with this piece of cod for quite a while now...
first i used this code which worked...
$(document).ready(function() {
$('#content').html('');
$.ajax({
url:'data.json',
dataType: "json",
success: function(data) {
$('#content').append(''+data.rank+'');
}
}...
If I'm connected to the local LAN here at work, I need to have my app access our server via an internal IP, otherwise, I'll need to use our external IP when out in the wild.
Currently, I just try to connect via the local IP and then try the external if it fails... but the timeout takes a bit too long and I was wondering if there's a way...
Hi all,
I've read a bunch of different things, none of which seem to be my situation. I have a site which uses a phpbb forum, and we also have multiple wordpress blogs which can use the database of phpbb via a plugin named wp-phpbb (can't post another hyperlink, but its at simplicitypoint dot com) . It works great for something that is...
Hi All,
I'm having a bit of a domain/scope issue when it comes to some plugins. Basically I'm using the OFC2 (http://pullmonkey.com/projects/open_flash_chart2/) for rails. However, I already have a class in use called Charts. I tried prepending a lot of my existing calls to Chart with "ActiveRecord::" but I'm not comfortable with thi...