Search Results

Search found 18982 results on 760 pages for 'url rewriting'.

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

  • Disabling URL decoding in nginx proxy

    - by Tomasz Nurkiewicz
    When I browse to this URL: http://localhost:8080/foo/%5B-%5D server (nc -l 8080) receives it as-is: GET /foo/%5B-%5D HTTP/1.1 However when I proxy this application via nginx: location /foo { proxy_pass http://localhost:8080/foo; } The same request routed through nginx port is forwarded with path decoded: GET /foo/[-] HTTP/1.1 Decoded square brackets in the GET path are causing the errors in the target server (HTTP Status 400 - Illegal character in path...) as they arrive un-escaped. Is there a way to disable URL decoding or encode it back so that the target server gets the exact same path when routed through nginx? Some clever URL rewrite rule?

    Read the article

  • Shortcut to open URL from clipboard

    - by good boy
    I want to create a shortcut that opens links from the clipboard. I frequently switch browsers and it's very annoying to copy/paste hundreds of URLs from one to another. I have created a shortcut to launch a page on each browser - but how can I make the URL field include data from clipboard, so that when I copy a URL and click on the shortcut, it will direct to the URL that is currently on the clipboard. If this is not possible, then is there an AutoHotKey script or something similar that can accomplish this? I would prefer a Desktop shortcut, but whatever works.

    Read the article

  • Remove Trailing Slash from WordPress URL (The site also don't have www)

    - by mrintech
    I need help as I am confused a lot with .htaccess Some months back, I removed WWW from the URL of my domain name using following .htaccess lines: RewriteCond %{HTTP_HOST} !^example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] Now, I also want to remove the trailing slash from the URL, as because I am using WordPress and a page/post will open, no matter if there's a trailing slash or NOT! I request you to please provide me the .htaccess code, so that I can REMOVE the trailing slash. Kindly remember, I don't want WWW also and I have already set .htaccess rule for the removal of WWW Note: 3 Years back when I started the blog, I set the Permalinks Structure without trailing slash. Now, suddenly Google Webmasters Tools is showing warnings. Also, the URL for rel="canonical" is WITHOUT trailing slash If you require any more details, I will be happy to provide

    Read the article

  • Any software for pattern-matching and -rewriting source code?

    - by Steven A. Lowe
    I have some old software (in a language that's not dead but is dead to me ;-)) that implements a basic pattern-matching and -rewriting system for source code. I am considering resurrecting this code, translating it into a modern language, and open-sourcing the project as a refactoring power-tool. Before I go much further, I want to know if anything like this exists already (my google-fu is fanning air on this tonight). Here's how it works: the pattern-matching part matches source-code patterns spanning multiple lines of code using a template with binding variables, the pattern-rewriting part uses a template to rewrite the matched code, inserting the contents of the bound variables from the matching template matching and rewriting templates are associated (1:1) by a simple (unconditional) rewrite rule the software operates on the abstract syntax tree (AST) of the input application, and outputs a modified AST which can then be regenerated into new source code for example, suppose we find a bunch of while-loops that really should be for-loops. The following template will match the while-loop pattern: Template oldLoopPtrn int @cnt@ = 0; while (@cnt@ < @max@) { … @body@ ++@cnt@; } End_Template while the following template will specify the output rewrite pattern: Template newLoopPtrn for(int @cnt@ = 0; @cnt@ < @max@; @cnt@++) { @body@ } End_Template and a simple rule to associate them Rule oldLoopPtrn --> newLoopPtrn so code that looks like this int i=0; while(i<arrlen) { printf("element %d: %f\n",i,arr[i]); ++i; } gets automatically rewritten to look like this for(int i = 0; i < arrlen; i++) { printf("element %d: %f\n",i,arr[i]); } The closest thing I've seen like this is some of the code-refactoring tools, but they seem to be geared towards interactive rewriting of selected snippets, not wholesale automated changes. I believe that this kind of tool could supercharge refactoring, and would work on multiple languages (even HTML/CSS). I also believe that converting and polishing the code base would be a huge project that I simply cannot do alone in any reasonable amount of time. So, anything like this out there already? If not, any obvious features (besides rewrite-rule conditions) to consider? EDIT: The one feature of this system that I like very much is that the template patterns are fairly obvious and easy to read because they're written in the same language as the target source code, not in some esoteric mutated regex/BNF format.

    Read the article

  • after .htaccess url rewrite, css lost, and cannot perform logoff in some of the url rewrited page

    - by Patrick
    Here is my working .htaccess Options +FollowSymlinks RewriteEngine on #rep.php RewriteRule ^all,all.html$ rep.php?repID=all&repName=all RewriteRule ^([A-Z]+),([A-Za-z\sA-Za-z]+)\.html$ rep.php?repID=$1&repName=$2 #rep.php with page numbers RewriteRule ^([A-Za-z]+),([A-Za-z\sA-Za-z]+),([0-9]+)\.html$ rep.php?repID=$1repName=$2&page=$3 #quotedetails.php RewriteRule ^(Q[0-9]+)\.html$ quotedetails.php?quoteID=$1 RewriteRule ^index.html$ index.php RewriteRule ^addquote.html$ addquote.php RewriteRule ^search.html$ search.php RewriteRule ^viewall.html$ viewall.php RewriteRule ^howto.html$ howto.php above code works, but if i change the rewrite url style to repID/repName/page.html, all the CSS will be lost, how to fix this issue? another issue is, i have a login panel (modified from Cool login system), in some of the rewrited url like all, all.html or repID, repName.html or quoteID.html, when I click log out button, its not working and not redirect me to the index.html. in other pages(addquote.html, viewall.html, howto.html, search.html..), it works fine and redirect me to the index.htm after i click the logout button.

    Read the article

  • .htaccess URL is being cut at a space (I'm using Codeigniter)

    - by Ice
    I've used the following code to map https://live.example.com on to http://example.com/api Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} ^live\.example\.com [NC] RewriteRule (.+)$ "http://example.com/api/$1" [L,P] The following url: https://live.example.com/userlinks/xml/John%20James/MvPjeUTo15/ Is suppose to map onto: http://example.com/api/userlinks/xml/John%20James/MvPjeUTo15/ Instead it maps it to: http://example.com/api/userlinks/xml/John So it seems to cut it at the space. I am using the Codeigniter framework but I am not sure if the problem lies there. Also using %20 or just a space in the url bar produces no different results. Anyone any idea and/or solution why this happens? Thank you very much, Ice

    Read the article

  • Passing URIs as URL arguments in Drupal

    - by wynz
    I'm running into problems trying to pass absolute URIs as parameters with clean URLs enabled. I've got hook_menu() set up like this: function mymodule_menu() { return array( 'page/%' = array( 'title' = 'DBpedia Display Test', 'page callback' = 'mymodule_dbpedia_display', 'page arguments' = array(1), ), ); } and in the page callback: function mymodule_dbpedia_display($uri) { // Make an HTTP request for this URI // and then render some things return $output; } What I'm hoping to do is somehow pass full URIs (e.g. "http://dbpedia.org/resource/Coffee") to my page callback. I've tried a few things and nothing's worked so far... http://mysite.com/page/http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Completely breaks Drupal's rewriting http://mysite.com/page/?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Gives a 404 http://mysite.com/page/http://dbpedia.org/resource/Coffee Returns just "http:", which makes sense I could probably use $_GET to pull out the whole query string, but I guess I'm hoping for a more 'Drupal' solution. Any suggestions?

    Read the article

  • SEO Url Redirect/Rewrite Using Database Managed Links

    - by user204245
    I have searched left and right. And i am trying to find a script or a method on how I can store links in database and use them for redirection. This is an E-commerce project and I am looking for something to manage Product and system URL from database. Something Similar like magneto dose. Basically anything after the domain say like domain.com/demo/12/my_iphone so now demo/12/my_iphone will be sent to database for querry and in databases there will be a destination URL which could be productlisting.php?searchstring=iphones so the user will see link domain.com/demo/12/my_iphone but actualy he will be seeing productlisting.php?searchstring=iphones basically demo/12/my_iphone = productlisting.php?searchstring=iphones and tomorrow if the user want to edit demo/12/my_iphone to demo/12/myiphone he can just do so using simple form which will update in the database. How can i achieve this ?

    Read the article

  • Passing URIs as URL arguments in Drupal 6

    - by wynz
    I'm running into problems trying to pass absolute URIs as parameters with clean URLs enabled. I've got hook_menu() set up like this: function mymodule_menu() { return array( 'page/%' = array( 'title' = 'DBpedia Display Test', 'page callback' = 'mymodule_dbpedia_display', 'page arguments' = array(1), ), ); } and in the page callback: function mymodule_dbpedia_display($uri) { // Make an HTTP request for this URI // and then render some things return $output; } What I'm hoping to do is somehow pass full URIs (e.g. "http://dbpedia.org/resource/Coffee") to my page callback. I've tried a few things and nothing's worked so far... http://mysite.com/page/http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Completely breaks Drupal's rewriting http://mysite.com/page/?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Gives a 404 http://mysite.com/page/http://dbpedia.org/resource/Coffee Returns just "http:", which makes sense I could probably use $_GET to pull out the whole query string, but I guess I'm hoping for a more 'Drupal' solution. Any suggestions?

    Read the article

  • How to get/obtain Variables from URL in Flash AS3

    - by Leon
    So I have a URL that I need my Flash movie to extract variables from: example link: http://www.example.com/example_xml.php?aID=1234&bID=5678 I need to get the aID and the bID numbers. I'm able to get the full URL into a String via ExternalInterface var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url; Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers. Appreciate any tips, links or help with this!

    Read the article

  • jquery - get url path?

    - by KittyYoung
    I know I can use window.location.pathname to return a url, but how do I parse the url? I have a url like this: http://localhost/messages/mine/9889 and I'm trying to check to see if "mine" exists in that url? So, if "mine" is the second piece in that url, I want to write an if statement based on that... if(second argument == 'mine') { do something }

    Read the article

  • Url for SEO Link

    - by k0ni
    Hi, i need a function (c#) or regular expression that makes me a nice URL out of a string. (and replaces invalid characters) Something like here on stackoverflow.. example: Short URL or long URL for SEO - short-url-or-long-url-for-seo Thanks

    Read the article

  • REST/ROA Architecture - Send database search/querying/filter/sorting parameters in URL? (>, <, IN, e

    - by DutrowLLC
    I'm building a REST interface to my application using ROA (Resource Oriented Architecture) . I'd like to give the client the ability to specify search parameters in URL. So a client could say "Give me all people who's: "first_name" is equal to "BOB" "age" is greater than "30" sort by "last_name" I was thinking something like: GET /PEOPLE/{query_parameters}/{sort_parameters} ...or perhaps GET /PEOPLE?query=<query_string>&sort=<sort_string> ...but I'm unsure what syntax would be good for specifying in the COLUMN_NAME-OPERATOR-VALUE triplicates. I was thinking perhaps something like: column_name.operator.value So the client could say: GET /PEOPLE?query=first_name.EQUALS.bob&query=age.GREATER_THAN.30&sort=last_name.ASCENDING I really don't want to re-invent the wheel here, are there some accepted ways that this is done? I am using Restlets, I don't know if that makes a difference.

    Read the article

  • Is it advisable to have non-ascii characters in the URL?

    - by Ravi Gummadi
    We are currently working on a I18N project. I was just wondering what are the complications of having the non-ascii characters in the URL. If its not, what are the alternatives to deal with this problem? EDIT (in response to Maxym's answer): The site is going to be local to specific country and I need not worry about the world wide public accessing this site. I understand that from usability point of view, It is really annoying. What are the other technical problem associated with this?

    Read the article

  • Load balancers, multiple data centers and url based routing

    - by kunkunur
    There is one data center - dc1. There is a business need to setup another data center - dc2 in another geography and there might be more in the future say dc3. Within the data center dc1: There are two web servers say WS1 and WS2. These two webservers do not share anything currently. There isnt any necessity foreseen to have more webservers within each dc. dc1 also has a local load balancer which has been setup with session stickiness. So if a user say u1 lands on dc1 and if the load balancer decides to route his first request to WS1 then from there on all u1's requests will get routed to WS1. Local load balancer and webservers are invisible to the user. Local load balancer listens to the traffic on a virtual ip which is assigned to the virtual cluster of webservers ws1 and ws2. Virtual ip is the ip to which the host name is resolved to in the DNS. There are no client specific subdomains as of now instead there is a client specific url(context). ex: www.example.com/client1 and www.example.com/client2. Given above when dc2 is onboarded I want to route the traffic between dc1 and dc2 based on the client. The options that I have found so far are. Have client specific subdomains e.g. client1.example.com and client2.example.com and assign each of them with the virtual ip of the data center to which I want to route them. or Assign www.example.com and www1.example.com to first dc i.e. dc1 and assign www2.example.com to dc2. All requests will first get routed to dc1 where WS1 and WS2 will redirect the user to www1.example.com or www2.example.com based on whether the url ends with /client1 or /client2. I need help in the following If I setup a global load balancer between dc1 and dc2 do I have any alternative solutions. That is, can a global load balancer route the traffic based on the url ? Are there drawbacks to subdomain based solutions compared to www1 solution? With www1 solution I am worried that it creates a dependency on dc1 atleast for the first request and the user will see that he is getting redirected to a different url.

    Read the article

  • Curly braces in a URL

    - by lipton
    Often I have came across URLS like the following: http://www.isthisahacker.com/{7B643FB915-845C-4A76-A071-677D62157FE07D}.htm Do the curly braces in the URL above indicate some kind of attempt to access the registry, or is that a legitimate URL? It looks kind of suspicious to me.

    Read the article

  • Problem with URL encoded parameters in URL view helper

    - by Richard Knop
    So my problem is kinda weird, it only occurs when I test the application offline (on my PC with WampServer), the same code works 100% correctly online. Here is how I use the helper (just example): <a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'index', 'action' => 'approve-photo', 'id' => $this->escape($a->id), 'ret' => urlencode('admin/index/photos')), null, true); ?>" class="blue">approve</a> Online, this link works great, it goes to the action which looks similar to this: public function approvePhotoAction() { $request = $this->getRequest(); $photos = $this->_getTable('Photos'); $dbTrans = false; try { $db = $this->_getDb(); $dbTrans = $db->beginTransaction(); $photos->edit($request->getParam('id'), array('status' => 'approved')); $db->commit(); } catch (Exception $e) { if (true === $dbTrans) { $db->rollBack(); } } $this->_redirect(urldecode($request->getParam('ret'))); } So online, it approves the photo and redirects back to the URL that is encoded as "ret" param in the URL ("admin/index/photos"). But offline with WampServer I click on the link and get 404 error like this: Not Found The requested URL /public/admin/index/approve-photo/id/1/ret/admin/index/photos was not found on this server. What the hell? I'm using the latest version of WampServer (WampServer 2.0i [11/07/09]). Everything else works. Here is my .htaccess file, just in case: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] # Turn off magic quotes #php_flag magic_quotes_gpc off I'm using virtual hosts to test ZF projects on my local PC. Here is how I add virtual hosts. httpd.conf: NameVirtualHost *:80 <VirtualHost *:80> ServerName myproject DocumentRoot "C:\wamp\www\myproject" </VirtualHost> the hosts file: 127.0.0.1 myproject Any help would be appreciated because this makes testing and debugging projects on my localhost a nightmare and almost impossible task. I have to upload everything online to check if it works :( UPDATE: Source code of the _redirect helper (built in ZF helper): /** * Set redirect in response object * * @return void */ protected function _redirect($url) { if ($this->getUseAbsoluteUri() && !preg_match('#^(https?|ftp)://#', $url)) { $host = (isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:''); $proto = (isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!=="off") ? 'https' : 'http'; $port = (isset($_SERVER['SERVER_PORT'])?$_SERVER['SERVER_PORT']:80); $uri = $proto . '://' . $host; if ((('http' == $proto) && (80 != $port)) || (('https' == $proto) && (443 != $port))) { $uri .= ':' . $port; } $url = $uri . '/' . ltrim($url, '/'); } $this->_redirectUrl = $url; $this->getResponse()->setRedirect($url, $this->getCode()); } UPDATE 2: Output of the helper offline: /admin/index/approve-photo/id/1/ret/admin%252Findex%252Fphotos And online (the same): /admin/index/approve-photo/id/1/ret/admin%252Findex%252Fphotos UPDATE 3: OK. The problem was actually with the virtual host configuration. The document root was set to C:\wamp\www\myproject instead of C:\wamp\www\myproject\public. And I was using this htaccess to redirect to the public folder: RewriteEngine On php_value upload_max_filesize 15M php_value post_max_size 15M php_value max_execution_time 200 php_value max_input_time 200 # Exclude some directories from URI rewriting #RewriteRule ^(dir1|dir2|dir3) - [L] RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^public/.*$ /public/index.php [NC,L] Damn it I don't know why I forgot about this, I thought the virtual host was configured correctly to the public folder, I was 100% sure about that, I also double checked it and saw no problem (wtf? am I blind?).

    Read the article

  • Mod Rewrite - url rewriting

    - by modrewriteNewbie
    I am very new to mod rewrite. I need to redirect any user with "citzenhawk" parameter in their url to my url for example http://www.mywebsite.com/?sc=CX12N003&cm_mmc=affiliate--citizenhawk--nooffer-_-na&prfc=5&clickid=0004c845fa9a87050a4277221a003262 should result into http://www.mywebsite.com/ Here are my rewrite conditions: RewriteCond %{QUERY_STRING} (&|^)cm_mmc=(.)citizenhawk(.)(&|$)$ RewriteRule ^/rrs/ [NC,R=302,L] Where am I going wrong? Is my RewriteCond wrong?

    Read the article

  • Drupal with clean urls turned on is putting question marks in URL

    - by aussiegeek
    I have a drupal site with clean urls, the pages load correctly, but then the URL is rewritten, which I really don't to happen. My .htaccess is: <IfModule mod_rewrite.c> RewriteEngine on # If your site can be accessed both with and without the 'www.' prefix, you # can use one of the following settings to redirect users to your preferred # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # adapt and uncomment the following: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment and adapt the following: # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] # Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: # RewriteBase /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: RewriteBase / # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_URI} !(connect|administration) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule>

    Read the article

  • Codeigniter's URL Rewriting Problem

    - by Saiful
    I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named assets beside my index.php file and it should be there. Now when i browse the directory by browser then the codeigniter’s not found page displays. I can’t browser the file /assets/image.jpg but it displays when i call it from an tag What can i do now? Note that it is working in my local server (localhost) but not in the live server. Signature $@!ful

    Read the article

  • Hiding Url for asp.net page

    - by user204588
    Hello, I'm creating an html page that is posted to another page for processing. I don't want users to see the weird URL they are redirected to and I was using FRAMES but I can't figure out how to add my HTML page dynamically because I need the variables and either add frames or try another way to accomplish this. So, based on how I'm creating the page below, how can I hide the URL and add something that I want. Here is how I'm creating the page. StringBuilder sb = new StringBuilder(); sb.Append("<html><head></head>"); sb.Append("<body onload=\"document.frmLaunch.submit();\">"); sb.Append("<form name=\"frmLaunch\" action=\"" + variableTargetURL + "\" method=\"post\">"); sb.Append("<input type=hidden name=\"testVariable\" value=\"" + variableTest + "\">"); sb.Append("</form>"); sb.Append("</body></html>"); HttpResponse response = HttpContext.Current.Response; response.Clear(); response.Write(sb.ToString()); response.End();

    Read the article

  • How can I rewrite / redirect URL's in Glassfish V3?

    - by Jin Liew
    Hi, I'd like to simplify the URL's to access a Glassfish V3 application by removing file extensions and otherwise shortening URL's. I've already set my application as the default application, so that there is no need to include the context root in the URL. I'd like to: * Remove file extensions * Shorten the URL to files deep in the folder structure I'd like to do this using pattern matching rather than on a per file basis (Site is small at the moment but will change frequently and grow). Some examples of what I'd like to do: * foo.com/bar.html - foo.com/bar * foo.com/folder1/folder2/bar2.html - foo.com/bar2 Any help would be greatly appreciated. Thanks. Cheers, Jin

    Read the article

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