Search Results

Search found 5346 results on 214 pages for 'sender rewriting'.

Page 11/214 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • URL rewriting to a common end point

    - by sunil
    I want to create an asp.net white-label site http://whitelabel.com, that could be styled for each of our clients according to their specific needs. So for example, client abc would see the site in their corporate colours and be accessed through their specific url http://abc.com. Likewise client xyz would see the site in their own styling and url http://xyz.com. Typing either url, in effect, takes the user to http://whitelabel.com where the styling is applied, and the client's url structure is retained. I was thinking of URL rewriting using URLRewriter.Net (http://urlrewriter.net/), or similar, mapping the incoming address to a client id and applying the theme accordingly. So, a url rewrite rule may be something like <rewrite url="http//abc.com/(.+)" to="~/$1?id=1" /> <rewrite url="http//xyz.com/(.+)" to="~/$1?id=2" /> I could then read the id, map it to the client, and with a bit of jiggery-pokery, apply the correct theme. I was wondering if: this is the right approach ? I've overlooked something ? there is a better way to do this ? Any suggestions would be appreciated.

    Read the article

  • .htaccess url rewrite with ssl redirection

    - by Stuart McAlpine
    I'm having trouble combining a url query parameter rewrite (fancy-url) with a .htaccess ssl redirection. My .htaccess file is currently: Options +FollowSymLinks Options -Indexes ServerSignature Off RewriteEngine on RewriteBase / # in https: process secure.html in https RewriteCond %{server_port} =443 RewriteCond $1 ^secure$ [NC] RewriteRule ^(.+).html$ index.php?page=$1 [QSA,L] # in https: force all other pages to http RewriteCond %{server_port} =443 RewriteCond $1 !^secure$ [NC] RewriteRule ^(.+).html$ http://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] # in http: force secure.html to https RewriteCond %{server_port} !=443 RewriteCond $1 ^secure$ [NC] RewriteRule ^(.+).html$ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] # in http: process other pages as http RewriteCond %{server_port} !=443 RewriteCond $1 !^secure$ [NC] RewriteRule ^(.+).html$ index.php?page=$1 [QSA,L] The fancy-url rewriting is working fine but the redirection to/from https isn't working at all. If I replace the 2 lines containing RewriteRule ^(.+).html$ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,N] with RewriteRule ^(.+).html$ https://%{HTTP_HOST}/index.php?page=$1 [QSA,L] then the https redirection works fine but the fancy-url rewriting doesn't work. Is it possible to combine these two?

    Read the article

  • Rewriting Live TCP/IP (Layer 4) Streams

    - by user213060
    I want to rewrite TCP/IP streams. Ettercap's etterfilter command lets you perform simple live replacements of TCP/IP data based on fixed strings or regexes. Example: if (ip.proto == TCP && tcp.dst == 80) { if (search(DATA.data, "gzip")) { replace("gzip", " "); msg("whited out gzip\n"); } } if (ip.proto == TCP && tcp.dst == 80) { if (search(DATA.data, "deflate")) { replace("deflate", " "); msg("whited out deflate\n"); } } http://ettercap.sourceforge.net/forum/viewtopic.php?t=2833 I would like to rewrite streams based on my own filter program instead of just simple string replacements. Anyone have an idea of how to do this? Is there anything other than Ettercap that can do live replacement like this, maybe as a plugin to a VPN software or something? The rewriting should occur at the transport layer (Layer 4) as it does in this example, instead of a lower layer packet-based approach. Thanks!

    Read the article

  • Google App Engine - "Invalid sender format" when sending e-mail

    - by Taylor Leese
    I'm trying to send an e-mail using Google App Engine. I'm getting the exception below and I'm not sure why at the moment. Any ideas? javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Illegal Arguments (java.lang.IllegalArgumentException: Bad Request: Invalid sender format)) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at com.mystuff.service.mail.MailService.sendActivationEmail(MailService.java:145) Below is the code related to sending the e-mail. public final void sendActivationEmail(final UserAccount user) { final Properties props = new Properties(); final Session session = Session.getDefaultInstance(props, null); final Message message = new MimeMessage(session); final Multipart multipart = new MimeMultipart(); final MimeBodyPart htmlPart = new MimeBodyPart(); final MimeBodyPart textPart = new MimeBodyPart(); final Locale locale = LocaleContextHolder.getLocale(); try { message.setFrom(new InternetAddress(getFromAddress(), "Qoogeo")); message.addRecipient(Message.RecipientType.TO, new InternetAddress(user.getUsername(), user.getFirstName() + " " + user.getLastName())); message.setSubject(messageSource.getMessage("mail.subject", null, locale)); textPart.setContent(messageSource.getMessage("mail.body.txt", new Object[] {getHostname(), user.getActivationKey()}, locale), "text/plain"); htmlPart.setContent(messageSource.getMessage("mail.body.html", new Object[] {getHostname(), user.getActivationKey()}, locale), "text/html"); multipart.addBodyPart(textPart); multipart.addBodyPart(htmlPart); message.setContent(multipart); Transport.send(message); } catch (MessagingException e) { LOGGER.warn(ERROR_MSG, e); } catch (UnsupportedEncodingException e) { LOGGER.warn(ERROR_MSG, e); } } Also, getFromAddress() returns "[email protected]".

    Read the article

  • Unit testing and mocking email sender in Python with Google AppEngine

    - by CVertex
    I'm a newbie to python and the app engine. I have this code that sends an email based on request params after some auth logic. in my Unit tests (i'm using GAEUnit), how do I confirm an email with specific contents were sent? - i.e. how do I mock the emailer with a fake emailer to verify send was called? class EmailHandler(webapp.RequestHandler): def bad_input(self): self.response.set_status(400) self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("<html><body>bad input </body></html>") def get(self): to_addr = self.request.get("to") subj = self.request.get("subject") msg = self.request.get("body") if not mail.is_email_valid(to_addr): # Return an error message... # self.bad_input() pass # authenticate here message = mail.EmailMessage() message.sender = "[email protected]" message.to = to_addr message.subject = subj message.body = msg message.send() self.response.headers['Content-Type'] = 'text/plain' self.response.out.write("<html><body>success!</body></html>") And the unit tests, import unittest from webtest import TestApp from google.appengine.ext import webapp from email import EmailHandler class SendingEmails(unittest.TestCase): def setUp(self): self.application = webapp.WSGIApplication([('/', EmailHandler)], debug=True) def test_success(self): app = TestApp(self.application) response = app.get('http://localhost:8080/[email protected]&body=blah_blah_blah&subject=mySubject') self.assertEqual('200 OK', response.status) self.assertTrue('success' in response) # somehow, assert email was sent

    Read the article

  • jQuery Selector based on sender

    - by Othman
    I have 4 select inputs with the same options. and I am trying to disable any option that has been selected from one of these selects. <select name="homeTeams[]" onchange="check()"> <option value="1">Team1</option> <option value="2">Team2</option> <option value="3">Team3</option> <option value="4">Team4</option> </select> <select name="homeTeams[]" onchange="check()"> <option value="1">Team1</option> <option value="2">Team2</option> <option value="3">Team3</option> <option value="4">Team4</option> </select> <select name="awayTeams[]" onchange="check()"> <option value="1">Team1</option> <option value="2">Team2</option> <option value="3">Team3</option> <option value="4">Team4</option> </select> <select name="awayTeams[]" onchange="check()"> <option value="1">Team1</option> <option value="2">Team2</option> <option value="3">Team3</option> <option value="4">Team4</option> </select> I am trying to disable the option that has been selected from one of these selectors. I am using jQuery to do it, but I can't get the value based on the sender. Ex: if the user has chosen Team1 from Select 1 the jQuery code will disable the option Team1 from Select2 and Select3 and Select4. function check() { var a = $('select option:selected').val(); alert(a); } it gives me the value of the first select. any Ideas ?

    Read the article

  • apache htaccess rewrite rules make redirection loop

    - by Ali
    Hi guys, Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my setup: I have a zend application with a single point of entry (index.php) directly under my apache document root (call this the "public" folder). I also have all other public files (images, js, css, etc.) under the public folder. Here, I also have a wordpress blog under the "blog" folder. There's an empty test folder too The Problem When I go to mydomain.com/blog, I get redirected to http://www.theredpin.com/blog (correctly), then to http://www.theredpin.com/blog/ (just with an extra / at end), finally to http://theredpin.com/blog/ -- and we're back where we started. The loop continues. What I don't understand is why would wordpress try to remove the www? I'm guessing it's wordpress because my empty test folder acts just fine! PLEASE HELP. I"M REALLY DESPERATE :( Thank you very much Other things that happen: When I go to mydomain.com, i correctly get redirected to www.mydomain.com When I go to www.mydomain.com, i correctly stay where I am When I go to www.mydomain.com/test or mydomain.com/test, behaviour is correct. Setup So my .htaccess file does the following: If there's no www., then add it and do a 301 redirect. Here's the code I use RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301] If the request is NOT for a resource (image, etc.), or the blog, then load zend application by rewriting to index.php RewriteRule !((^blog(/)?.*$)|(.(js|ico|gif|jpg|jpeg|png|css|cur|JPG|html|txt))$) index.php Thanks again for all your help!!! Ali

    Read the article

  • Rackspace Cloud rewrite jpg causes Session reset

    - by willoller
    This may be the .Net version of this question. I have an image script with the following: ... Response.WriteFile(filename); Response.End(); I am rewriting .jpg files using the following rewrite rule in web.config: <rule name="Image Redirect" stopProcessing="true"> <match url="^product-images/(.*).jpg" /> <conditions> <add input="{REQUEST_URI}" pattern="\.(jp?g|JP?G)$" /> </conditions> <action type="Redirect" redirectType="SeeOther" url="/product-images/ProductImage.aspx?path=product-images/{tolower:{R:1}}.jpg" /> </rule> It basically just rewrites the image path into a query parameter. The problem is that (intermittently of course) Mosso returns a new Asp Session cookie which breaks the whole world. Directly accessing a static .jpg file does not cause this problem. Directly accessing the image script does not cause it either. Only rewriting a .jpg file to the .aspx script causes the Session loss. Things I have tried (From the Rackspace doc How can I bypass the cache?) I added Private cacheability to the image script itself: Response.Cache.SetCacheability(HttpCacheability.Private); I tried adding these cache-disabling nodes to web.config: <staticContent> <clientCache cacheControlMode="DisableCache" /> </staticContent> and <httpProtocol> <customHeaders> <add name="Cache-Control private" value="Cache-Control private" </customHeaders> </httpProtocol> The Solution I need The browser cache cannot be disabled. This means potential solutions involving Cache.SetNoStore() or HttpCacheability.NoCache will not work.

    Read the article

  • How to secure postfix to find out whether the emails are coming really from the sender?

    - by codeworxx
    Is it possible to secure postfix in a way, that incoming emails are checked on whether the email comes really from the sender? Is that possible to write php script and chose a sender, like the mail is really coming from the sender and what are the possibilities for postfix to find out that this mail is not actually coming from the real sender? What I have found out and activated are the options smtpd_sender_restrictions = reject_unknown_sender_domain unknown_address_reject_code = 554 smtpd_client_restrictions = reject_unknown_client unknown_client_reject_code = 554 Please mention, whether I have missed out on any points!

    Read the article

  • URL Rewrite query database?

    - by Liam
    Im trying to understand how URL rewriting works. I have the following link... mysite.com/profile.php?id=23 I want to rewrite the above url with the Users first and last name... mysite.com/directory/liam-gallagher From what Ive read however you specify the rule for what the url should be output as, But how do i query my table to get each users name? Sorry if this is hard to understand, ive confused myself!

    Read the article

  • Can I do a URL Rewrite to a different Tomcat instance?

    - by RodeoClown
    Is is possible to use Tuckey's URL Rewrite to rewrite to a different Tomcat instance? I have it working using crossContext="true" rewriting to a different servlet on the same tomcat instance, but our production server has multiple tomcat instances running and I want to rewrite to one of them instead? If it's not possible using the URL Rewrite filter, is there another way of doing it? Thanks.

    Read the article

  • Mod rewrite urls with

    - by Andrew
    Hey Guys, I'm at my wits end here , I normally like to work things out on my own but this has me well and truly beaten here.. I'm trying to mod rewrite my urls that contain pluses... /search.php?q=can+be+any+length to /can-be-any-length.html Any help would be really appreciated becaus rewriting the + php is not an option

    Read the article

  • IIRF with IIS and the ASP.Net Tilda(~)

    - by Justin808
    Hello, When I turn on URL Rewriting to access a page, the ~ no long is replaced with the application root. For example should produce: but its only outputting The tilda is supposed to be replaced with the application root path but it looks like IIRF is messing with that somehow? Any ideas on how to fix this?

    Read the article

  • Wordpress htaccess problem

    - by ajithperuva
    I have some problem with my htaccess file .here am adding my problem.Please help me My actual url is as follows http://localhost/buydualit/?searchitem=toaster&pagenum=1 here by using my .htaccess am rewrited my url as http://localhost/buydualit/toaster-1/ My url rewriting rule is like follows RewriteRule ^[A-Za-z-0-9,\"'-\/]+-([0-9]+)\/$ buydualit/index.php?pagenum=$1&searchitem=$2 In this rule how can i retrieve toaster from http://localhost/buydualit/toaster-1/ (searchitem=$2 which is not getting) please help me

    Read the article

  • Helicon ISAPI Rewrite Proxy 500 Internal Server Error

    - by Rob Stevenson-Leggett
    Hi, I have a website running at www.domain.com. The client now wants the website to appear to be running under www.otherdomain.com/whatson/brand/ Since the website is umbraco it won't run under a subfolder. I wanted to use ISAPI rewrite to proxy requests to www.domain.com using the following rule in a .htaccess at www.otherdomain.com/whatson/brand/ RewriteRule ^(.*)$ http://www.domain.com/$1 [P,L] However, when I apply this I get an ugly 500 Internal Server Error. There's nothing in the event log. So I turned on ISAPI logging and can see the following 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (2) init rewrite engine with requested uri /whatson/brand/home.aspx Then it testing all the other rewrite rules on the server. Then this 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (1) Htaccess process request w:\websites\otherdomain.com\docs2\whatson\brand\.htaccess 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (3) applying pattern '^(.*)$' to uri 'home.aspx' 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (2) forcing proxy-throughput with http://www.domain.com/home.aspx 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (1) go-ahead with proxy request http://www.domain.com/home.aspx [OK] 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (2) rewrite 'home.aspx' -> '/whatson/brand/home.aspxx.rwhlp?p=0' 111.111.111.111 111.111.111.111 Tue, 12-Jan-2010 13:05:24 GMT [www.otherdomain.com/sid#2045305275][rid#26337200/initial] (2) internal redirect with /whatson/brand/home.aspxx.rwhlp?p=0 [INTERNAL REDIRECT] So it appears to work according to the logs, but I'm not seeing the page come through.. It's worth noting that www.domain.com and www.otherdomain.com are on the same box. LogLevel is 3 and RewriteLogLevel is 3 (I've tried with 9 and debug but there is too much traffic going through the other sites on the box) Any ideas?

    Read the article

  • How to manage sub-domains on WinHost with IIS7 URL Rewrite 2.0?

    - by jrummell
    I'm trying out WinHost and I'm running into some issues with sub-domains. On WinHost, you can have multiple sub-domains per hosting account, but each sub-domain points to the root website. E.g. you can have www.example.com, sub1.example.com, and sub2.example.com but all of them display the content at http://www.example.com/. Other Hosts allow you to point sub-domains to a sub folder in your website. This would allow you to point sub1.example.com to /sub1, sub2.example.com to /sub2 and www.example.com to /. WinHost recommends using an asp/aspx page to redirect http://sub1.example.com to http://sub1.example.com/sub1, which points to /sub1. While that would work, I'd like to not have the subdomain in the url twice. So I tried using IIS7 URL Rewrite to point http://sub1.example.com to /sub1. Ben Powell describes this in detail on his blog. This is great, except Request.ApplicationPath is now /sub1/path/to/current/page.aspx, which breaks ASP.Net Themes (and probably other stuff too). What can I do to fix the ApplicationPath? Is there a better way to accomplish this?

    Read the article

  • URL Rewrite is adding HTTPS to my canonical redirects in IIS7

    - by Derek Hunziker
    Hello, I have the following rule defined in my Web.config: <rule name="Enforce canonical hostname" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" negate="true" pattern="^www\.mydomain\.org$" /> </conditions> <action type="Redirect" url="http://www.mydomain.com/" redirectType="Permanent" /> </rule> What I am experiencing is strange... It appears that I am being redirected to https://www.mydomain.com/ which causes my browser to hang. I do not have SSL encryption turned on, nor do I have any special authorization rules. The web server in question is behind an F5 load balancer. Any ideas?

    Read the article

  • Legacy URL rewriting with query string parameters

    - by John Kaster
    I've looked at http://stackoverflow.com/questions/817325/asp-net-mvc-routing-legacy-urls-passing-querystring-ids-to-controller-actions and several other similar posts for legacy URL routing, but I can't get past the error "The RouteData must contain an item named 'controller' with a non-empty string value." Looking this up on line didn't give me any hints to solve my problem. I've implemented the Legacy routing class described in the link above, and this is what I've defined in the routing table: routes.Add( "Legacy", new LegacyRoute("fooref.aspx", "FooRef", new LegacyRouteHandler()) ); routes.MapRoute( "FooRef", "{controller}/{action}", new { controller = "Home", action = "Index", foo_id = UrlParameter.Optional, bar_id = UrlParameter.Optional } ); When I use Phil Haack's route debugger, it indicates that fooref.aspx has a match, but when I turn the route debugger off, I get the error above. If I reverse the statement order, I get "Resource not found" for /ctprefer.aspx, which makes sense -- so it appears to be finding that as a valid route when put in the other order. Where do I need to declare this missing controller reference? Have routing requirements changed for ASP.NET MVC 2 RTM?

    Read the article

  • mod_pagespeed is rewriting but not combining

    - by Marc vd M
    I have the following problem. I installed mod_pagespeed but i am not getting the results i want! It does rewrite my css and changes the to the cache url but its not combining the css files. I have seached the web and stackoverflow for it but did not find a solution. Here are the tags <link media="all" type="text/css" href="http://domain.com/assets/css/bootstrap.min.css.pagespeed.ce.Iz3TwZXylG.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.jquery-ui-1.8.24.custom.css.pagespeed.cf.9yjmvb9yjz.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.bootstrap.extend.css.pagespeed.cf.VelsS-YQRX.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.base.css.pagespeed.cf.QO1yNADs1p.css" rel="stylesheet"> <link media="all" type="text/css" href="http://domain.com/assets/css/W.style.css.pagespeed.cf.tRzIhRbblc.css" rel="stylesheet">

    Read the article

  • Bulk email sender and list management API

    - by goombaloon
    I'm looking for a way to programmatically manage email lists and send large numbers of emails to these lists. The general idea would be similar to how social networking sites send email notifications when a friend posts new content. Since a user could have tens of thousands of followers, it doesn't seem realistic to send these directly from my application so I'm curious if there's a good way to handle this through a service provider. My company is using Google apps but I'm not an expert on their API. Our environment is ASP.NET MVC. Any advice is most appreciated!

    Read the article

  • IIS7 url rewrite rules

    - by sympatric greg
    In a hosted environment, I will be utilizing subdomains (and virtual directories) for various coding projects. I have a rewrite rule that changes 'subdomain.domain.com/url' to 'domain.com/subdomain/url'. This worked fine, except that the browser couldn't find resources with paths generated by ResolveURL("~/something"). The server was using the Application Path of "/subdomain/" so based on the rewrite rule, the browser's request for "/subdomain/something" was being looked for in "/subdomain/subdomain/something" were it wasn't to be found. either of these urls were valid: http://www.domain.com/subdomain/something http://subdomain.domain.com/something I resolved this by adding a another url rewrite rule to the subdomain: <rule name="RemoveSuperDir"> <match url="subdomain/(.*)" /> <action type="Rewrite" url="{R:1}" /> </rule> So for each subdomain that I might add, I will need to add such a rule. Is there a way to write a single rule at the domain level to resolve this issue?

    Read the article

  • Ionics Rewrite Filter setup on IIS 5.1

    - by Neil Aitken
    I'm trying to configure IIRF 2 on IIS 5.1 running on XP Pro, so that I can run the Zend Framework. I've managed to get the filter running on a second website that I setup using one the IIS admin scripts. When I goto iirfStatus I get this: The problem is the .ini path for the site is pointing to c:\windows\system32\Irif.ini rather than the site root. If I try creating an IIS application under IIS-Website Properties-Home Directory then iirfStatus stops working entirely. Any ideas how I can set the ini path correctly, or will I only be able to get away with this on a proper server edition of IIS?

    Read the article

  • .htaccess rewrite rules

    - by psynnott
    The below code adds www. to any url that does not start with it: RewriteCond %{HTTPS} !on [OR] RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^(www\.)?(.+) RewriteRule ^ https://www.%2%{REQUEST_URI} [L,R=301] However, I want it to do this only when the url is of the format: something.com If the url is like: something.something.com I do not want the rule adding www. How do I change this?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >