Search Results

Search found 19174 results on 767 pages for 'restful url'.

Page 19/767 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • "digg" button and encoded url :S

    - by guest86
    Hi! I wrote a php site (it's still a prototype) and i placed a "Digg" button. Placing the button was easy but.... Official manual says "url has to be encoded". I did that with urlencode(). After urlencode, my url looks like this: http%3A%2F%2Fwww.mysite.com%2Fen%2Fredirect.php%3Fl%3Dhttp%3A%2F%2Fwww.othersite.rs%2FNews%2FWorld%2F227040%2FRusia-Airplane-crashed%26N%3DRusia%3A+Airplane+crashed So far, so good but when i want to submit that url to digg, it is recognized as invalid url: http://www.mysite.com/en/redirect.php?l=http://www.othersite.rs/News/World/227040/Rusia-Airplane-crashed&N=Rusia:+Airplane crashed If i place a "+" between "Airplane" and "crashed" (mere end of a link), then digg recognize it without any problems! Please help, this bizare problem is killing my braincells! P.S. for purpose of this answer urls are changed (nonexisting) because, in original, non-english sites are involved P.S.S. Happy New Year! :)

    Read the article

  • url rewriting - build paths

    - by Cristian Boariu
    Hi guys, I have started to work on a site without url rewriting. Now, the request is to use friendly urls so i started to use Intelligencia.UrlRewriter. Let's take an example: I have a method: public static string getCategoriesIndexLink(string category) { string baseUrl = getBaseUrl() + (String)HttpContext.GetGlobalResourceObject("Paths", "categorii.index"); return baseUrl.AddQueryParam(CQueryStringParameters.CATEGORY, category); } which build this kind of urls "~/Site/Categorii.aspx?category=$1" Now i've added the following rule in web.config: <rewrite url="~/Site/Categorii/(.+)" to="~/Site/Categorii.aspx?category=$1" /> The question is HOW i can make the above method to build that kind of nice url? So no longer return "~/Site/Categorii.aspx?category=m1" but "~/Site/Categorii/m1" without beeing needed to modify its structure? I mean, i have about 30 methods like the one from the above; it would be extremely helpfull if i can be guided to use a regex at the output of the methods iso modifying the url construction... Thanks in advance...

    Read the article

  • Can an URL shortener pass parameters?

    - by ManniAT
    Hi, I use bit.ly to shorten my urls. My problem - paramters are not passed. Let me explain I use http://bit.ly/MYiPhoneApps which redirects (let's say) to http://iphone.pp-p.net/default.aspx Now when I try http://bit.ly/MYiPhoneApps?param=xx this param is not added to the resulting url. I know I could create an extra "short url" including a paramter - so http://bit.ly/WithParam would result in http://www.mysite.com/somepath/apage.aspx?Par1=yy and so forth. But what I want is to have a short URL directing to a page - and then I want to add a parameter to this shortened url - which shoul (of course) land at my page. Is this a shortcome of bit.ly (and others are maybe able to do it) - or does "parameter forwarding" not work with 301 redirections? Manfred

    Read the article

  • SEF URL Problem in Joomla1.5

    - by Emrul Hasan
    My joomla site url is: http://www.cessnatrader.com. I am using SEF URL for this site. The SEF URL is not working in the main menu(in top). But it is working fine for other places(other links, footer menu). I don't know what the problem is. I did all the things for enabling SEF URL in joomla. But it is not working in one place(main menu). What should I do? Note: I am using "Mosets tree" component in this site.

    Read the article

  • String Functions in IIS Url Rewritting Module

    - by Nariman
    The IIS URL Rewrite Module ships with 3 built-in functions: * ToLower - returns the input string converted to lower case. * UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). * UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. The functions can be invoked by using the following syntax: {function_name:any_string} The question is: can this list be extended by introducing a Replace function that's available for changing values within a rewrite rule action or condition?

    Read the article

  • ASP.NET MVC Url Masking/Rewriting

    - by Dan Appleyard
    Let us say I have a url of subdomain.domain.com. Is there a way in ASP.NET MVC to have a url of say otherdomain.com/gotothesubdomain that takes you to subdomain.domain.com? I know that a simple redirect could do it, but I want the url to stay as otherdomain.com/gotothesubdomain. Any advice would be greatly appreciated and thanks!

    Read the article

  • Django, url tag in template doesn't work: NoReverseMatch

    - by Lukasz Jocz
    I've encountered a problem with generating reverse url in templates in django. I'm trying to solve it since a few hours and I have no idea what the problem might be. URL reversing works great in models and views: # like this in models.py @models.permalink def get_absolute_url(self): return ('entry', (), { 'entry_id': self.entry.id, }) # or this in views.py return HttpResponseRedirect(reverse('entry',args=(entry_id,))) but when I'm trying to make it in template I get such an error: NoReverseMatch at /entry/1/ Reverse for ''add_comment'' with arguments '(1L,)' and keyword arguments '{}' not found. My file structure looks like this: project/ +-- frontend ¦   +-- models.py ¦   +-- urls.py ¦   +-- views.py +-- settings.py +-- templates ¦   +-- add_comment.html ¦   +-- entry.html +-- utils ¦   +-- with_template.py +-- wsgi.py My urls.py: from project.frontend.views import * from django.conf.urls import patterns, include, url urlpatterns = patterns('project.frontend.views', url(r'^entry/(?P<entry_id>\d+)/', 'entry', name="entry"), (r'^entry_list/', 'entry_list'), Then entry_list.html: {% extends "base.html" %} {% block content %} {% for entry in entries %} {% url 'entry' entry.id %} {% endfor %} {% endblock %} In views.py I have: @with_template def entry(request, entry_id): entry = Entry.objects.get(id=entry_id) entry.comments = entry.get_comments() return locals() where with_template is following decorator(but I don't think this is a case): class TheWrapper(object): def __init__(self, default_template_name): self.default_template_name = default_template_name def __call__(self, func): def decorated_func(request, *args, **kwargs): extra_context = kwargs.pop('extra_context', {}) dictionary = {} ret = func(request, *args, **kwargs) if isinstance(ret, HttpResponse): return ret dictionary.update(ret) dictionary.update(extra_context) return render_to_response(dictionary.get('template_name', self.default_template_name), context_instance=RequestContext(request), dictionary=dictionary) update_wrapper(decorated_func, func) return decorated_func if not callable(arg): return TheWrapper(arg) else: default_template_name = ''.join([ arg.__name__, '.html']) return TheWrapper(default_template_name)(arg) Do you have any idea, what may cause the problem? Great thanks in advance!

    Read the article

  • Why can't I open a JBoss vfs:/ URL?

    - by skiphoppy
    We are upgrading our application from JBoss 4 to JBoss 6. A couple of pieces of our application get delivered to the client in an unusual way: jars are looked up inside of our application and sent to the client from a servlet, where the client extracts them in order to run certain support functions. In JBoss 4 we would look these jars up with the classloader and find a jar:// URL which would be used to read the jar and send its contents to the client. In JBoss 6 when we perform the lookup we get a vfs:/ URL. I understand that this is from the org.jboss.vfs package. Unfortunately when I call openStream() on this URL and read from the stream, I immediately get an EOF (read() returns -1). What gives? Why can't I read the resource this URL refers to? I've tried trying to access the underlying VFS packages to open the file through the JBoss VFS API, but most of the API appears to be private, and I couldn't find a routine to translate from a vfs:/ URL to a VFS VirtualFile object, so I couldn't get anywhere. I can try to find the file on disk within JBoss, but that approach sounds very failure prone on upgrade. Our old approach was to use Java Web Start to distribute the jars to the client and then look them up within Java Web Start's cache to extract them. But that broke on every minor upgrade of Java because the layout of the cache changed.

    Read the article

  • Java URL Connection Time Out

    - by webren
    Hello, I am attempting to connect to a website where I'd like to extract its HTML contents. My application will never connect to the site - only time out. Here is my code: URL url = new URL("www.website.com"); URLConnection connection = url.openConnection(); connection.setConnectTimeout(2000); connection.setReadTimeOut(2000); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()); String line; while ((line = reader.readLine()) != null) { // do stuff with line } reader.close(); Any ideas would be greatly appreciated. Thanks!

    Read the article

  • Parse Domain from a given URL in T-SQL

    - by Adam N
    I fount this answer, but wanted to expand on the question and couldn't find any solutions here on stack or through searching google. Substring domainname from URL SQL Basically the link above solves my problem with a simple URL like parsing "www.google.com" with the result of google. What I am looking for to expand on that is the solution from the link above doesn't help with url's like 'www.maps.google.com' that just returns maps. WHat I would like is to have it return 'google' from the url 'www.maps.google.com' or return 'example' from 'www.test.example.com'. If anyone has a solution to this, I would greatly appreciate it. Update: To be more specific I will also need parsing on second level domains etc. 'www.maps.google.com.au' to return 'google' Here is my Sql function. CREATE FUNCTION [dbo].[parseURL] (@strURL varchar(1000)) RETURNS varchar(1000) AS BEGIN IF CHARINDEX('.', REPLACE(@strURL, 'www.','')) > 0 SELECT @strURL = LEFT(REPLACE(@strURL, 'www.',''), CHARINDEX('.',REPLACE(@strURL, 'www.',''))-1) Else SELECT @strURL = REPLACE(@strURL, 'www.','') RETURN @strURL END

    Read the article

  • iOS - Open certain view controller with URL scheme

    - by hansenmd
    I'm playing around with URL schemes in my app. I easily made one to open my app, just adding the necessary items to info.plist. This current URL "myappname://" takes the user to the initial view controller, FirstTableViewController, but I was wondering if it would be possible to modify that URL scheme so it I can have one that takes the user to a certain view controller, such as ThirdTableViewController. I would use this as a handy feature in something like Launch Center.

    Read the article

  • Can I rewrite the whole url?

    - by Yaroslav Yakovlev
    I need to rewrite the whole url. E.g. I have a http://UrlToRewrite.com/default.aspx?myParams=myvalues and I need it to be http://SingleUrl.com Is it possible to make such a thing with default url rewriters? Another question is, is it possible to make the same thing, but depending on the parameter destination url will be http://SingleUrl1.com and http://SingleUrl2.com.

    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

  • PHP something faster than explode to get filename from URL

    - by FFish
    My URL's can be absolute or relative: $rel = "date/album/001.jpg"; $abs = "http://www.site.com/date/album/image.jpg"; function getFilename($url) { $imgName = explode("/", $url); $imgName = $imgName[count($imgName) - 1]; echo $imgName; } There must be a faster way to do this right? Maybe a reg expression? But that's Chinese to me..

    Read the article

  • url and nameserver question

    - by aristotaly
    i have hosting accout in go daddy its a delux plan so i can assign more than one url right now i got two of them they both registerd throgh go daddy in the same account. right now i would like to give some storage space to a freind that have a url ( also go ddady) in a different account . and i do not know how to do it . i think he needs to set up his name servers as my name servers so he did and than i should add his url in the domain maneger i did that also and even installed joomla on this particular folder that i assinged to his url nothing happenend . am i missing somthing ? plz help if you can :)

    Read the article

  • Url Rewriting with Querystrings

    - by Alon
    In IIS 7.5, I'm trying to rewrite a Url such as /about to /content.asp?p=about, with support for QueryString-s, so if the orginal Url was /about?x=y, it should rewrite to /content.asp?p=about&x=y. The basic rewriting is now working, but when I'm trying to add a QueryString it doesn't work. Tried both /about?x=y and /about&x=y. My current rule: <rule name="RewriteUserFriendlyURL1" stopProcessing="false"> <match url="^([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="content.asp?p={R:1}" /> </rule> How can I fix this? Thank you.

    Read the article

  • Rewrite URL in PHP with mod_rewrite

    - by Steven
    The web server is Apache. I want to rewrite URL so a user won't know the actual directory. For example: The original URL: www.mydomainname.com/en/piecework/piecework.php?piecework_id=11 Expected URL: piecework.mydomainname.com/en/11 How to achieve it with mod_rewrite?

    Read the article

  • cakephp alias url

    - by tecks
    Hi all, The url structure of my cakephp based site is mysite/cakephp/myapp/index.php/controller/action/input_paramaters I cannot remove index.php from my url, as I dont have access to httpd.conf file. Anyways, my question is that I just need to change the url of my homepage to something like http://mysite or mysite/myapp How would I do that? Thanks a lot!!

    Read the article

  • URL rewriting in Wordpress

    - by Ajith
    I want to rewrite my url in wordpress. How can i rewrite my url in wordpress. I am trying to create htaccess file like following <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /shopboxtile/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([0-9]+)$ http://localhost/shopboxtile/?productid=$1 </IfModule> I think it is not correct.please help me to correct it. My requirement is to convert url from http://localhost/shopboxtile/?productid=59961 to http://localhost/shopboxtile/59961

    Read the article

  • JQuery URL Validator

    - by Vincent
    All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a text box that has a URL. I want to write a function which takes the textbox value, uses the jquery's validator plugin to validate urls and returns true or false. Something like Ex: function validateURL(textval) { // var valid = get jquery's validate plugin return value if(valid) { return true; } return false; } I wanted this to be a reusable function.. Thanks

    Read the article

  • Getting SharePoint absolute site url

    - by Francis
    I need to get the current absolute url of my site from inside an aspx page (no codebehind). I tried $SPUrl, but it get's converted into a relative url. <asp:Literal runat="server" text="<% $SPUrl:~Site/mypage.aspx %>" /> results in "/mypage.aspx". It's important that I get the full absolute url starting with "http://". <asp:Literal runat="server" text="<% $SPUrl:~SiteCollection/mypage.aspx %>" /> does the same. The goal is to get this url: "http://myspweb.com/mypage.aspx" as result.

    Read the article

  • IIS7 URL Rewriting: How not to drop HTTPS protocol from rewritten URL?

    - by Scott Mitchell
    I'm working on a website that's using IIS 7's URL rewriting feature to do a permanent redirect from example.com to www.example.com, as well as rewrites from similar domain names to the "main" one, such as from www.examples.com to www.example.com. This rewrite rule - shown below - has worked well for sometime now. However, we recently added HTTPS support and noticed that if users visit one of the URLs to be rewritten to www.example.com then HTTPS is dropped. For instance, if a user visits https://example.com they get redirected to http://www.example.com, whereas we would like them to be sent to https://www.example.com. Here is the rewrite rule of interest (in Web.config): <rule name="Canonical Host Name" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^example\.com$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?example\.net$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?example\.info$" /> <add input="{HTTP_HOST}" pattern="^(www\.)?examples\.com$" /> </conditions> <action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" /> </rule> As you can see, the action element's url attribute points directly to http://, so I get why https://example.com is redirected to http://www.example.com. My question is, how do I fix this? I tried (naively) to just drop the http:// part from the url attribute, but that didn't work. Thanks!

    Read the article

  • URL Routing to Default Page

    - by ewitkows
    Hi everyone, I have an asp.net 4.0 web forms app setup with url rereouting. In development, my app's URL looks perfect. I have a page called enrollnow.aspx that responds to the routing, so if I type in localhost/enrollnow/abc, my app responds as expected. Once promoted into my staging environment however, the URL is off. I have a domain, and a virtual dir created off of my domain called "enrollnow". So basically, my URL outside of development is: mydomain.com/enrollnow/enrollnow/abc - where the first enrollnow is the directory, the second enrollnow is the page name, and the abc is my route value. Is there any way I can have the "default page" respond, so the second enrollnow (which is enrollnow.asp) isnt required? Perhaps I can rename my enrollnow.aspx page to default.aspx, or I can change the mapping in my routetable? Heres my routetable, incase that helps. thanks! Routetable: RouteTable.Routes.Add("PURLRoute", New Route("EnrollNow/{PURL_ID}", New PageRouteHandler("~/EnrollNow.aspx")))

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >