Search Results

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

Page 14/767 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • htaccess: Redirect a Dynamic URL - Show only Static URL - Double Content

    - by elmaso
    Hi, I have a rewrite rule to get clean urls.. the only problem is, google shows some dynamic url and i dont want to serve dynamic urls. What I want: if a user types in the dynamic url, he gets redirected to the clean url.. example: http://www.example.com/?index=bananas (if someone types that in, he gets redirect to the url above) http://www.examplcom/bananas/ this is my htacces: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond $1 !apple\+banana RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L] thank you!!

    Read the article

  • How to get a long url from a short url

    - by JK
    I would like to determine what the long url of a short url is. I have tried using http HEAD requests, but very few of the returned header fields actually contain any data pertaining to the destination/long url. Is there: 1. Any way to determine the long url? 2. If so, can it be done without downloading the body of the destination? Thank you

    Read the article

  • What does RESTful web applications mean? [closed]

    - by John Cooper
    Possible Duplicate: What is REST (in simple English) What does RESTful web applications mean? A web service is a function that can be accessed by other programs over the web (Http). To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser. A web service is not targeted at humans but rather at other programs. SOAP and REST are two ways of creating WebServices. Correct me if i am wrong? What are other ways i can create a WebService? What does it mean fully RESTful web Application?

    Read the article

  • Allow (and correct the URL) when there is a special character such as %26 using IIS and the rewrite module

    - by plumtreematt
    I'm struggling with a legacy app that uses special characters like %26 in the URL. The characters don't affect the app but can't be changed, so I'm trying to get IIS to deal with them. I've tried to ignore them using multiple methods, but nothing seems to work. So now I installed the IIS rewrite module and added a rewrite rule to web.config to replace the characters %26 with _, for example: <rewrite> <rules> <rule name="ampersand" patternSyntax="Wildcard" stopProcessing="true"> <match url="*%26*" /> <action type="Redirect" url="{R:1}_{R:2}" /> </rule> </rules> </rewrite> The problem is that IIS responds with "Bad Request" before the rewrite rule ever gets called. So my question is this: how can I change the order of precedence so that the mod rewrite filter will be called before IIS puts the ban hammer down on that URL?

    Read the article

  • asp.net client/browser url

    - by Marcus King
    I'm wondering how I can get the url from the browser in asp.net. I have a page that I use globalization/localization for and I am redirecting (via server not code) from www.spanishversion.com to www.englishversion.com but the url is masked to still say www.spanishversion.com. I want to get what the browser's url is but when I try things like Request.Url.ToString() Request.Url.OriginalUrl Request.Path Request.RawUrl Request.ServerVariables["SERVER_NAME"] it always comes back as www.englishversion.com. Is there a way that I can explicitly read the url from the browser? Thanks.

    Read the article

  • Why is it not good to use $_SESSION in Restful Implementations?

    - by keisimone
    Original Question: i read that for RESTful websites. it is not good to use $_SESSION. Why is it not good? how then do i properly authenticate users without looking up database all the time to check for the user's roles? I read that it is not good to use $_SESSION. http://www.recessframework.org/page/towards-restful-php-5-basic-tips I am creating a WEBSITE, not web service in PHP. and i am trying to make it more RESTful. at least in spirit. right now i am rewriting all the action to use Form tags POST and add in a hidden value called _method which would be "delete" for deleting action and "put" for updating action. however, i am not sure why it is recommended NOT to use $_SESSION. i would like to know why and what can i do to improve. To allow easy authorization checking, what i did was to after logging in the user, the username is stored in the $_SESSION. Everytime the user navigates to a page, the page would check if the username is stored inside $_SESSION and then based on the $_SESSION retrieves all the info including privileges from the database and then evaluates the authorization to access the page based on the info retrieved. Is the way I am implementing bad? not RESTful? how do i improve performance and security? Thank you.

    Read the article

  • Request URL in Javascript, Fetch URL Content using Java Applet, return to Javascript?

    - by Sam G
    I'm in the process of making a little experiment, it grabs a YouTube page, and returns the highest quality MP4 link, then plays this in a HTML 5 Video element. Now I was using PHP with cURL to get the URL content (YouTube), but that only works on my local server (MP4 link is locked to IP address). I can't think of any other way to get the page content due to cross domain rules except a Java applet. So I've built a Java applet that should return the content of a URL. Java import java.applet.Applet; import java.awt.*; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class URLFetcherabc extends Applet { public void init() { } public void paint(Graphics g) { g.drawString("Java loaded. Waiting for URL", 0, 10); } public String getURL(String url, String httpMethod) { try { URL u = new URL(url); HttpURLConnection conn = (HttpURLConnection)u.openConnection(); conn.setRequestMethod(httpMethod); InputStream is = conn.getInputStream(); ByteArrayOutputStream output = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; for (int bytesRead = 0; (bytesRead = is.read(buffer)) != -1; ) { output.write(buffer, 0, bytesRead); } return output.toString(); } catch (Exception e) { }return null; } } Now I've got the applet on the page, but every-time I call the function it returns nothing. Heres my HTML for including the applet. HTML <applet id="URLFetcher" name="URLFetcher" code="URLFetcherabc.class" archive="URLFetcher.jar" height="200" width="200" mayscript=""></applet> Java-Script function fetchurl(urltofetch) { var URLFetcher = document.getElementById("URLFetcher"); var result = URLFetcher.getURL(urltofetch); //Result = URL Content return result; } The function always returns null, in Java the function does work when passed a variable via other means (parameter etc). I've tried running other functions through Javascript and the Java applet does respond. I'm new to Java applets and communicating with them via Javascript, so I'm probably making either a small mistake somewhere or its completely wrong. Any ideas? Thanks

    Read the article

  • Searching for URL's Relative to Site Root in Javascript Source

    - by James
    Hi, I am working on a web site with several other developers and we have had problems where people commit JavaScript code with AJAX calls that use URL's relative to the site root. An example would be /Home/Index which will not work if the site is hosted in a virtual directory. To get round the problem we use a $.url() method to convert it to a full path, e.g. $("#container").load($.url("/Home/Index")) I am trying to write a unit test that will search each JavaScript file and find places where the $.url method is not being used. The only problem is that I cannot seem to write a regex expression to do this. I have tried the following: (?!\$\.url\()"(/\w*)+" But this does not work. I cannot find a way to say that I don't want the $.url in front. Does anyone know if this is possible? Note that I need regular expressions that are compatible with .NET Thanks.

    Read the article

  • Reading http file on url

    - by Nkunzis
    I am trying to read an xml file on an http url. "Unexpected end of file from server" keeps on coming . the page is password protected, I would like to know if I am properly giving in my url authentication details. I tried with non protected pages and I can read them properly. Here is my code: URL url = new URL("http://username:[email protected]:0000/test.xml"); URLConnection yc = url.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();

    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

  • Disable .htaccess or disable some rules from .htaccess on specific URL

    - by petRUShka
    I have Kerberos-based authentication and I want to disable it on only root url: mysite.com/. And I want it to works fine on any other page like mysite.com/page1. I have such things in my .htaccess: AuthType Kerberos AuthName "Domain login" KrbAuthRealms DOMAIN.COM KrbMethodK5Passwd on Krb5KeyTab /etc/httpd/httpd.keytab require valid-user I want to turn it off only for root URL. As workaround it is possible to turn off using .htaccess in virtual host config. Unfortunately I don't know how to do it. Part of my vhost.conf: <Directory /home/user/www/current/public/> Options -MultiViews +FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> It would be great if you can advice me something!

    Read the article

  • IIS 7 URL rewrite rule

    - by Andrew
    Hello, guys! We have here to web servers behind a router - one IIS and one Tomcat (on different machines / IP addresses). The domain is pointing to out external IP, which is forwarded to IIS (internal IP 192.168.1.10 for example). I'm trying to do the following: when [www.]ourdomain.com is entered the default web site on IIS have to be loaded (this part is ok), but when test.ourdomain.com is entered I want to redirect this request to another web server (192.168.1.11 for example). I created a site "test" on IIS and it is displayed when test.ourdomain.com is entered. Then I tried to redirect it with following rule: Requested URL matches the pattern: * (using wildcards) Condition: {HTTP_HOST} matches test.ourdomain.com Action type: Rewrite Rewrite URL: http://192.168.1.11/{R:0} but when I try to load test.ourdomain.com now I get IIS's error 404 page. Obviously I'm wrong :-) How can I do such a redirect?

    Read the article

  • Routing a url to fetch content from another site

    - by Abhishek
    Environment: IIS 7. I have a default site www.domain.com and its folder is C:Inetpub/wwwroot/domain There is subdomain www.subdomain.domain.com and its folder is C:Inetpub/wwwroot/domain/subdomain. Now I have setup a new website at an external server. I cannot put the content on the above server due to some reasons. I need the URL www.subdomain.domain.com/blog fetch content from this external server while the URL should remain the same. How could this be achieved in IIS 7?

    Read the article

  • disable 250 character URL limit in Internet Explorer

    - by Keltari
    Users of a SharePoint Document Library are getting this error: The URL for this file is too long for the application. A temporary copy of this file will be opened on your computer. You must save this copy as a new file. After doing some research, it appears Internet Explorer has a limit of about ~250 characters for a URL. Some URLs provided by SharePoint far exceed this limit. One example being 790 characters long. Is there a way to disable this limit? I have looked, but there doesnt appear to be a solution, other than shortening the folder/path names.

    Read the article

  • ASP.NET, URL Rewriting and threads on Linux?

    - by acidzombie24
    Right now converting my normal sql(ite) syntax into compatible MS Server syntax is driving me mad. My code seems to be mono compatible judging by MoMA. However in global.asax i start several threads in Application_Start to use as a service and excessive url rewrites in Application_BeginRequest (everything is rewriting into default.aspx which calls C# code/class baded on the url). The urls do not have extensions or my have false extentions ie mysite.com/username/page/title.lol - id I need it all to go to BeginRequest. I also need files to be downloadable. Usually the path will be rewritten as from /file/user/filename to /file/u/s/user/file. Would this be supported on linux+mono+a good webserver?

    Read the article

  • How to download a url as a file?

    - by Michelle
    A website url has "hidden" some mp3 files by embedding them as shockwave files, as follows: <span class="caption"><!-- Odeo player --><embed src="http://odeo.com/flash/audio_player_tiny_gray.swf"quality="high" name="audio_player_tiny_gray" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true external_url=http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></span> How can I download the files for off-line listening? I've found two methods: 1. The StackOverflow Method Create a new local html file with just the links eg <a href="http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3">Sunday Edition 25Nov2008</a> Open the file in the browser, right click the link and File Save Link As. 2. The SuperUser Method Install the Firefox addin Iget. (Be sure to use the right version for your Firefox version.) Tools Downloads Enter url in field. Are there any other ways?

    Read the article

  • Apache url rewrite to Nginx

    - by Kaloyan
    i work on a little php platform and my server is nginx. The first version of this php site was developed for Apache server. I need to upgrade the site and to migrate it to nginx server. The problem is url rewriting. I have this simple url rewrite rules in my Apache server: RewriteEngine On RewriteBase /simple-php/ RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteRule ^(.*)$ viewpost.php?id=$1 [QSA,L] I can't "translate" this to nginx rewrite syntax. Can anybody help me? P.S. I can read both documentations, but i have not this time, just need fast solution. Thanks!

    Read the article

  • How to download a URL as a file?

    - by Michelle
    A website URL has "hidden" some MP3 files by embedding them as Shockwave files, as follows. <span class="caption"><!-- Odeo player --><embed src="http://odeo.com/flash/audio_player_tiny_gray.swf"quality="high" name="audio_player_tiny_gray" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true external_url=http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></span> How can I download the files for off-line listening? I've found two methods: 1. The Stack Overflow Method Create a new local HTML file with just the links, for example: <a href="http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3">Sunday Edition 25Nov2008</a> Open the file in the browser, right click the link and File Save Link As. 2. The Super User Method Install the Firefox addin Iget. (Be sure to use the right version for your Firefox version.) Tools Downloads Enter URL in the field. Are there any other ways?

    Read the article

  • How to change the URL on my Amazon EC2 webserver

    - by Sarah
    I am at the point in playing around with EC2 that I have launched a webserver. Right now, the website URL looks like http://ec2-<some numbers>.compute-1.amazonaws.com/ I am evaluating the usefulness of these services for my small business purposes; is there a way I can get my URL to look something more like http://<mybusiness>.com. Ideally, I would like to get it to look cleaner, and furthermore I would rather not have "amazonaws" as part of it. Is this possible? I'm a newb to AWS, so apologies if this is an easy question

    Read the article

  • Project name inserted automatically in url when using django template url tag

    - by thebossman
    I am applying the 'url' template tag to all links in my current Django project. I have my urls named like so... url(r'^login/$', 'login', name='site_login'), This allows me to access /login at my site's root. I have my template tag defined like so... <a href="{% url site_login %}"> It works fine, except that Django automatically resolves that url as /myprojectname/login, not /login. Both urls are accessible. Why? Is there an option to remove the projectname? This occurs for all url tags, not just this one.

    Read the article

  • Is trailing slash automagically added on click of home page URL in browser?

    - by Question Overflow
    I am asking this because whenever I mouseover a link to a home page (e.g. http://www.example.com), I notice that a trailing slash is always added (as observed on the status bar of the browser) whether the home page link contains a href attribute that ends with a slash or not. But whenever I am on the home page, the URL on display will not have a trailing slash. I tried entering a slash to the URL in the URL bar. And with Firebug enabled, I notice that the site always return a 200 OK status. An article here discussing this states that having a slash at the end will avoid a 301 redirection. But I am not seeing any redirection, even on this page. Could this be a browser feature that is appending the slash?

    Read the article

  • In terms of SEO, is it better to have a URL broken down by folder, or with dashed names?

    - by VictorKilo
    I am creating a friendly url interpreter for my website. I have read dozens of similar topics on this site, but none that seem to address my particular situation. What I want to know is if it's better to have: A well broken down URL where each category is represented by a folder domain.com/1036/OR/Lane/Lowell/Wetleau-Subdivision -OR- A URL which groups all of the categories and terms together domain.com/1036/Wetleau-Subdivision-Lowell-OR-Lane I am asking only in terms of what is best for SEO, not necessarily human readability. My thinking is that it may be better to group them all together like they are in the second example. My reasoning being that all of those terms represent the page and are more likely to draw a result. I am a complete SEO nub though, and I crave some expert guidance. Thank you in advance for any help given.

    Read the article

  • What is the best stucture of SEO friendly URL?

    - by Aajahid
    I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this: mysite.com/category-name/pageid-123-page-name I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was thissite.com/category-name/pageid-123-page-name.html Another was thatsite.com/category-name/pageid-123-page-name.php Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better? Or if my current plan is okay, will it be better with a / at the end?

    Read the article

  • How to keep google rank and index for a page that changed its url? [closed]

    - by ProSoft
    Possible Duplicate: How to tell Google that I have changed my website URLs? Recently, I changed URL of my web page. Of course, I do it by URL rewriting. And now, I want to keep the rank of this page in Google and Bing. For example: Main address of the page: http://mywebsite.com/page1.php Virtual address by URL rewriting: http://mywebsite.com/page And new address is: http://mywebsite.com/newTitlePage Now, when I open this page by search in Google, I face to 401 error (not found). How should I do it?

    Read the article

  • Are generic keywords in url bad for SEO? [closed]

    - by user1661479
    Possible Duplicate: Squeezing all the SEO out of a URL as possible Need help with url structure. Let's say I'm a manufacturer of Wire EDM machines. Is it bad for me to put the keywords wire-edm in my url to help try to raise SEO ranking? For example: mywebsite.com/wire-edm/machine/model-xxxx mywebsite.com/wire-edm/customer-service mywebsite.com/wire-edm/contact Or should I leave it as the following because the gains are fairly insignificant and it doesn't help users understand my site structure: mywebsite.com/machine/model-xxxx mywebsite.com/customer-service mywebsite.com/contact I’d like to hear what everyones thoughts are on this and please provide some sources for which method is better.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >