|
|
Hi
I am working on a website in struts. For URL redirection, httpredirectfilter java interface is used in thos website. All the redirections are working fine, except one for which I sought for your help.
Currently, we have 3 locales in my site that work on 2 Top Level Domains.
Locale Names
en_US ------ For US
en_CA ------ For Canada
fr_CA ------- For Canada
Top Level Domain (TLDs)
.com
.ca
Currently all the locales work in conjunction with both the TLDs. This is affecting our GA tracking, so we decided to restrict Canada locales to .ca TLD and US locale to .com TLD. For this purpose, I made code modifications in two of the files, httpredirectfilter.xml & .htaccess. I tested these modifications in our local environment and they work good. However, when I push them to production site, these modifications are not reflected in the live site. Not able to understand the reason for this. Hosting company says there is no configuration on their end which stops redirection. So I seek to work with you to check if this is a permission issue. In case, if its something different from permission issue, please let me now on that.
I am using following code in httpredirectfilter.xml for redirection:
<redirect match="^www.mysite.com/en_CA/(.*)$" target="http://www.mysite.ca/en_CA/$1"
permanent="yes" enitre-url="yes />
I'll be grateful for any help provided
modified on Sunday, December 20, 2009 12:48 AM
|
|
|
|
|
how to get an user account activated using memebership api in asp.net
|
|
|
|
|
I'm looking for a solution to the same.
modified on Wednesday, January 27, 2010 9:56 AM
|
|
|
|
|
Hello,
What is the best method to deploy an VS 2008 Web Application? My web application contains webservice references, libraries etc and i have to publish this to my production server which has iis 6.0 on it. Should i use VS Web Deployment method? Should i go with pre compilation and publsih the website?Or webset up project? I am confused as you can see .. Any help would be greatly appreciated.
Thanks much
|
|
|
|
|
1. Copy the source folder on the server
2. Create the Virtual Directory
3. Set the .NET version properly
4. Set the start page
5. Test the virtual directory
You are set to launch the site
|
|
|
|
|
Thanks much for your reply, so you are saying i dont need to create deployment file for the project and i have webservice reference in my code. What is the best way to handle that.
Thank you and appreciate your suggestions!!!
|
|
|
|
|
Hi
Do not set your code on the webserver, but the compiled version.
This is done by doing a publish (right click on project name in the solution explorer)
Copy the published files to your webserver location and follow the steps 2-5 as above.
Have fun,
Mark
_______________
0x2B || !0x2B
|
|
|
|
|
Thanks alot Mark for your reply, so you are saying i dont need to create seperate websetup project or use VS 2008 webdeployment projects to deploy my web application to production server?
Appreciate your help!!
unni
|
|
|
|
|
Only create a setup if you need to.
It only makes it more complex and it does not always does what you want.
By just copying the files you see what you are doing and updates are realy easy done this way
Have fun,
Mark
_______________
0x2B || !0x2B
|
|
|
|
|
Hi all,
This is the first time I faced this problem when trying to achieve this simple task.
I have a form, with an add button which when clicked, allows the user to search and select data which gets dynamically added to my form as a textbox.
When I submit this form, this dynamically added textbox, along with anymore added with this feature are not recognized as part of the form and do not get sent to the server side script. I verified this using an iterator through all form elements.
I had to explicitly add the textbox (its HTML) to the container as well as a child to the form. Only then did it get sent to my PHP script.
Has anyone in this weird world ever faced this problem?
I checked problems with "disabled, readonly, etc" and also made sure theres no ID conflicts or name conflicts with the rest of the form.
Though my app works just fine with this work around, I am baffled as to why this has never happened to me in all the times I've implemented such a feature before but now.
Any help would be appreciated.
|
|
|
|
|
Not entirely sure here but when the button is clicked to do it's job - add the textbox to the form - is this a server side command or client side?
If it's client side then your server won't necessarily see the ID's of the dynamically created textboxes - unless it's explicity told to do so.
Possibly the problem...
|
|
|
|
|
Thanks John,
It is a client side command that adds a textbox to a container within the form.
Why does the client not send these new form controls to the server? What is the solution to this?
I had to explicitly add the form element to its container (for display to the user) and also add it as a child to the form itself. I'm sure there is a more elegant solution to this.
|
|
|
|
|
There could be a number of reasons. Would you mind if you posted a snipet of your code - ?
|
|
|
|
|
Sure here's my story:
Here is the JS function that adds a row to a table inside a form that contains the textbox in question.
function ppl_add_admin_asst(id, resultsArray){
if(resultsArray.length > 0){
var name = resultsArray[..][..];
var id = resultsArray[..][..];
var str = "<tr id='asst_"+id+"_row'><td>";
var str1 = "<input type='text' readonly='readonly' name='admin_asst["+id+"][name]' id='admin_asst_"+id+"_name' value='"+name+"' />";
str1 += " <span class='form_elements_edit' style='font-weight:bold'><a href='#' onclick=\"removeRow('admin_asst_"+id+"_row');\"><img border='0' src='images/buttons/edit.gif' > Remove</a></span>";
str += str1+"</td></tr>";
//appending it to the table which is already a part of the form should include this new textbox to be part of the form
$("#assts_table").append(str);
//However, I need to explicitly add it to the form as well for it to work correctly
$("#edit_form").append(str1);
cancelFindProfile(id);
}
}
|
|
|
|
|
Your JS looks good and is doing it's job. The problems not the simple server-client relationship I thought it was. What's happening is the server side script isn't set up to receive additional rows.. It's possibly only aware of the fields that are there when the page first loads. Sorry to answer your problem with another problem.
I'm not too hot on PHP - sorry I can't help you any further.
|
|
|
|
|
Thanks for trying John. I have succesfully implemented this on different environments and never came across this problem so it looks like a server quirk. Such moody bugs are best handled with "work arounds" as I did. Should just leave it be I guess.
|
|
|
|
|
Yeah I come across many 'quirks' all the time. I'm a .NET man and although I love the platform and it is very good - us developers always come across the cracks in the system.
Work arounds are sometimes the only way.
Cheers
JB
|
|
|
|
|
malvik wrote: Should just leave it be I guess.
Your choice. But, before you do, if you use Firefox browser, perhaps you might want to download and install the "Web Developer" Add-On. It could help you resolving this problem.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I use the Web Developer Toolbar extensively and also Firebug. Both confirm that the DOM placement of my textboxes is correct and in fact within the form. I just migrated the files to my localhost and it works on that perfect so I think it is an environment thing.
|
|
|
|
|
Hi friends,
I am working on customizing the WebBrowser ActiveX control.
I want to change the text hightlight/selection color. I hve
searched a lot, but hve found nothing conclusive. Hope anyone
here would help.
Thanks in Advance..
|
|
|
|
|
Hi Guys,
I'm trying to remote desktop onto my PC at home, however since I have ADSL and my ISP doesnt support static IP addresses, I end up having to check my IP address before I head into work. Problem is my line is pretty rubbish, and the connection gets dropped every 4-6 hours. So i get maybe 4-6 hours out of it, then no longer have access to my home desktop.
Thinking on it, the easiest solution (Barring a Static IP) is to run a script that will automatically write my IP to my website (hosted externally).
Does anyone have any ideas on how to do this? Solutionising is welcome?
Thanks for your help, Grg
|
|
|
|
|
Have you tried TeamViewer[^]?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thanks Walt,
Yeah, I've used this previously. I want to try and steer clear of all in one solutions. Anyone with any thoughts on writing IP to a website?
|
|
|
|
|
DynDns offers a free service that gives you a free subdomain hostname controlled by their client updater software; you simply install the software on your home PC, and it will automatically keep the IP address synced with the DynDns hostname.
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|