You have hidden characters in your string. You probably copied the URL from a Word file or a text file that was converted in Windows. There is a BOM marker in its beginning. When I do this: System.out.println( Arrays.toString(text.getBytes(StandardCharsets.UTF_16BE))); This is the output I get: [-2, -1, 0, 104, 0,...

Those are placeholders value, that you would need to replace by an actual value in order to use those links. It serves to remind a user how to access, for instance, the following_url for another user. without {/other_user}, that url https://api.github.com/users/zhuhuihuihui/following would list all users followed. with {/other_user}, that url...

A fragment is an internal page reference, sometimes called a named anchor. It usually appears at the end of a URL and begins with a hash (#) character followed by an identifier. It refers to a section within a web page. In HTML documents, the browser looks for an anchor...

related question: Is there a version of JavaScript's String.indexOf() that allows for regular expressions? But only for a case sensitive is more easy to do: window.location.href.toLowerCase().indexOf("youtube.com/thumbnail?id=") ...

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html, which defines these status codes: 10.5.4 503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length...

its possible , you need to import ur views with diffrent names , if they have same name you can do this : from . import views from another.directory import views as views2 urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^test/', views2.index, name='index2')), ] but its not a cool idea ,...

Since you are testing, maybe you could test the php directly? The function get_query_var is just a wrapper for the generic php array $_GET. You should have these values available at $_GET['product_category'] and $_GET['brand']. But instead of assuming everything is where it is supposed to be, why not check what...

What you did wrong is use punycode. Punycode is used for domain names, including the domain-name part of a URL, only. Other parts of a URL, including the query-parameter part, use Percent Encoding also known as URL encoding or URI encoding, and that is what Chrome is doing; this encodes...

You can replace the result of following regex : ^/([^/]*)/(.*) with : /your_word/\2 #or /your_word/$2 for some languages For example in python you can do : >>> re.sub(r'^/([^/]*)/(.*)',r'/-------/\2',"/testing/graphics/real.gif") '/-------/graphics/real.gif' ...

As the OP Just needs to fix the Navigation problem. Here's what i would do. I would just take the current page url by $Url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; and then concat with the navigation <a href="<?php echo $Url ?>?lang=en">Home</a> So, The Code will be <?php $Url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?> <a href="<?php...

You always need the import, however you can still use semi-colons to separate statements, but why would you do that!?!?!? from urllib.request import urlopen; print(int(str(urllib.request.urlopen("http://ir.eia.gov/ngs/wngsr.txt").read()).split("\\n")[4].split(" ")[2])) # note the semi-colon ^ ...

If you want to make NSURL array then you have to convert every String to NSURL first then you can add it to NSURL array and you can do it this way: var urls : [NSURL] = [NSURL(string: "http://trialwebsite.ucoz.com/GurujiHymns/02_BIGDI_MERI_TAQDIR_KO_Singer_Masoom_Thakur.mp3")!,NSURL(string: "http://trialwebsite.ucoz.com/GurujiHymns/02_BIGDI_MERI_TAQDIR_KO_Singer_Masoom_Thakur.mp3")!,NSURL(string: "http://trialwebsite.ucoz.com/GurujiHymns/03_GURU_JI_TERI_REHMAT_Singer_Sada_Thakur.mp3")!] urls.append( NSURL(string:...

If outlook is sabotaging your links, then you need to make your links case indifferent. If you absolutely must keep upper and lowercase in your links for decryption, use a marker character: Generate encrypted string. Before each upper case character, insert marker character (pick a valid character your encryption scheme...

It uses an encoding scheme called Punycode (as you've already discovered from the Python testing you've done), capable of representing Unicode characters in ASCII-only format. Each label (delimited by dots, so get.me.a.coffee.com has five labels) that contains Unicode characters is encoded in Punycode and prefixed with the string xn--. The...

You need to URL-Encode your query string, like this: package main import ( "fmt" "net/url" ) func main() { query := make(url.Values) query.Add("domain", "example.com?foo=bar") fmt.Println(query.Encode()) } Which outputs domain=example.com%3Ffoo%3Dbar. You can set that string as a RawQuery of an url.URL value and if you then access the query like you...

Use function parse_url() to split the URL into components then do some basic analysis on the pieces it returns (or just check if the returned value is an array() or FALSE). As the documentation says: This function is not meant to validate the given URL, it only breaks it up...

First of all you need a function that accepts a link and returns the body output. Then parse all the links out of the body and keep a list of links. Check that list if you didn't visit the link yet. Remove those visited links from the new links list...

Well, you can always look up ASP.NET MVC source code, and copy what you need, if it is not implemented in mono yet. Here you can find it: https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/src/System.Web.Mvc/Html/LinkExtensions.cs But I've been using mono and ASP.NET MVC 4, and I had no problem like you. Here is my code on...

You can do this using Laravel by setting up a route to a function that will do the ordering. Please note I've made a lot of assumptions in the following answer as I can't see all your code and have made it quite general, please adjust the code to your...

Parameters that are included with the redirectAction result type are reflected in the URL. To remove them from the URL you need to remove them from the result config. <action name="BackToManagerIndex" class="Action.LoginAction" method="ManagerList"> <result type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/Manager</param> </result> </action> Another action after redirecting should take parameters from the...

Ok, figured this on out on my own. What I was looking for was how to create a sub-domain name. This is easy. just take an existing domain name that you own and add a name in front of it. An example would be dev.mydomain.com. I can then go into...

It's better to use the second one for better SEO results. example.com/en/link example.com/ru/ссылка Google likes the tree-like structure. Of course you can use the main language without prefix. Also it's better to have all languages in one domain: domain.com/en domain.com/ru not on subdomains like this en.domain.com ru.domain.com Wish you luck....

If I understand you correctly, you want the url to be a link but also display as a url. To do this put the url in the a tag twice, like so: This can then be style as desired by the destination page. <style> a { color: blue; text-decoration: underline;...

Define the protocol you want to use in your URL chrome.tabs.create({ url: "https://www.google.co.in/search?q=" + info.selectionText, }); // ^^^^^^^^ You will encounter the same behaviour on <a> if you don't define a protocol (or start the URI with // which would mean "use the same protocol as we're on now"). This...

I would propose to check if ALL your OG tags are correct, https://developers.facebook.com/tools/debug/og/object/ or just simply use Facebook OGP plugin for Wordpress, which makes your work easy. Search WP plugins here https://wordpress.org/plugins/search.php?type=term&q=facebook+OGP...

This would be the first step. Add a Document ready statement so javascript execute himself after DOM is loaded. document.addEventListener("DOMContentLoaded", function(event) { if (window.location.href.indexOf("http://www.test.com/xzy") != -1) { $("#Menu").hide(); } }); if you need it to work in IE8, I read you can use this: r(function(){ if (window.location.href.indexOf("http://www.test.com/xzy") != -1) {...

ok , I assume you want to change the URI from http://www.example.com/result.php?team=arsenal&player=ospina to http://www.example/subdirectory/arsenal/ospina.html so this is the .htaccess that will do that for you RewriteEngine on RewriteCond %{QUERY_STRING} ^team=(.*)\&player=(.*)$ RewriteRule ^(.*)$ http://www.example.com/subdirectory/%1/%2.html [R=301] you can test it with htaccess tester here http://htaccess.madewithlove.be/ and some useful links for documentation and...

I got where I am going wrong. while giving the redirection tag like <a href='ViewProfile.asp?mem_id=phani#1&page=1'> it should be like <a href='ViewProfile.asp?mem_id=Server.UrlEncode(phani#1)&page=1'> This solves the issue....

You can either use SwiftyJson or do it manually. You get the json so you do not need to convert it to NSString. First unwrap the dictionary using json! Second you need to get stuff that you want. As you see you need to get the value from "data" key...

The <c:url> does indeed not take servlet path into account. That's your own responsibility. The <c:url> only takes HttpServletRequest#getContextPath() into account. Either hardcode yourself: <c:url value="/web/browse" /> Or inline result of HttpServletRequest#getServletPath(): <c:url value="${pageContext.request.servletPath}/browse" /> Or if you're forwarding, inline result of RequestDispatcher#FORWARD_SERVLET_PATH: <c:url value="${requestScope['javax.servlet.forward.servlet_path']}/browse" /> Wrap if necessary in...

Your issue is that the first rule matches, the last one can never get applied... RewriteEngine on RewriteRule ^gallery/([0-9]+)/?$ gallery.php?id=$1 [NC,L] RewriteRule ^([0-9a-zA-Z_-]+)/([0-9]+)$ products.php?cat=$1&id=$2 [NC,L] RewriteRule ^([^/]*)/([0-9a-zA-Z_-]+)/([0-9]+)$ product_categories.php?cat=$2&id=$3 [NC,L] RewriteRule ^(.*)/(.*)/([0-9a-zA-Z_-]+)/([0-9]+)$ product_details.php?cat=$3&id=$4 [NC,L] Rule of thumb: first the specific exceptions, then the more general rules. The NC flag does not...

I cannot give you the answer on how you have to redirect visitors to the right domain (from a technical point of view). That depends on the system (WordPress, Joomla, Magento or none at all) and the programming language you use (PHP, ASP.Net). Edit: how to determine what language to...

As you can see in Play's routing documentation you can use the colon syntax to define that some part of your route URL is a variable and pass that variable to the controller method, ie: POST /students/:studentNo controllers.Application.Post(studentNo: Long) ...

if you are running from eclipse you have to pass the arguments. right click program - > run as - > run configurations -> arguments ->program arguments . in this tab pass the actual url which will be passed as args[0] to your main method....

80 is a default port for HTTP connections. http://example.com = http://example.com:80 443 is a default port for HTTPS connections. https://example.com = https://example.com:443 If you are hosting on an other port, you have to include it in the URL. It's not a IIS rule - it's about HTTP in general. You...

How do you know that it's only half of the response? If you rely on what is printed with System.out.println() then you should be aware that Logcat has a limitation that prevents it from printing more than 4,000 characters. Anything after that is truncated. To check how much of the...

Since # is used to differentiate the path and query parameters in the URL (AngularJS format) and when the query parameter values are changed after the page is loaded, the page doesn't refresh automatically. It can be fixed using the below code where the hashchange event fires when a window's...

if your server document root is /usr/share/nginx/html you can use $_SERVER['DOCUMENT_ROOT'] require $_SERVER['DOCUMENT_ROOT'].'/includes/header.php'; For the database file that is located outside of the server root - it is good practice to have the config file outside the document root, but it could be that you took it a bit too...

Yes its possible to have a page switch with a page such as http://www.example.com/contact. You will need to re-write traffic however, so if you have access to a .htacess file you can add something like this RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.+)/?$ http://www.example.com?p=$1 [NC,L,QSA] This way...

This should work for you: Here I check with preg_match() if the search word is in the url $str between two slashes. If yes I get the substr() from the url after the search word and explode() it into an array with a slash as delimiter. Then you can simply...

First of all, JSF is a HTML code generator. So it's not different in JSF than in "plain" HTML. You should just not look at file system structure in webapp project when creating links in HTML. You should look at public URL structure of those resources. It's namely the webbrowser...

Your first array value is not a parameter. It's the URL you want to add the query string to. http_build_query() builds query strings, not entire URLs. So remove that value and then append the results of http_build_query() to it: $parameters =array( 'REQUEST_TYPE'=>'2', 'MID'=>'5' ); $url = 'https://pguat.paytm.com/oltp-­‐web/processTransaction?' . http_build_query($parameters); ...

There is a full guide to mod_rewrite here that looks pretty good. You have to scroll down a bit to get to url as parameters. https://www.branded3.com/blog/htaccess-mod_rewrite-ultimate-guide/ If you don't want to mess too much with mod_rewrite and already have everything directed through a single public index.php (which is a good...

The way you're meant to do it is indeed to add the namespace to the URL tag; {% url 'frontpage:edit_page' slug='SLUG' %} But it would be better practice to structure your main project URls file like this; urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), # NOQA url(r'frontpage', include('noc.apps.frontpage.urls', namespace='frontpage', app_name='frontpage')), That...

Use the replace menu by pressing Ctrl+H, and make sure regular expressions are enabled. Then, Find (^.*\/).* and Replace $1: https://regex101.com/r/lJ4lF9/12 Alternatively, Find (?m)(^.*\/).* and Replace $1: https://regex101.com/r/lJ4lF9/13 Explanation: Within a capture group, Find the start of the string (^) followed by anything any number of times (.*) until the...

It seems to look ok but one thing you should do is always put your other rules before the wordpress rules as a habit. When using wordpress it should generally be the last set of rules since it does all the routing. Now for the redirect, you should probably use...

The answer is in the specification in the link that you post... For each byte sequence bytes in sequences, run these substeps: If bytes is the empty byte sequence, run these substeps for the next byte sequence. If bytes contains a =, then let name be the bytes from the...

Maybe my question was unclear, after a lot of searching and trying I got my application to work, no matter in what subfolder it is installed. I did this bij adding request.getContextPath() to the beginning of every url in de jsp (view) page. For example to get the css file:...

Use hidden type form's element named id: echo "<form action=\"/leaguemaster/fichaTorneio.php\">"; echo "<input type=\"hidden\" name=\"id\" value=\"$_GET[torneioid]\" />" Notice: I did not set the method attribute to the form because the GET method is the default method for HTML forms and it makes the form submits its values through the URL query...

You can use listSafe method instead of list. From npmjs.org/package/ftp "This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command."...

You need to do two things: Modify the last column so that the KEGGLINK is changed into a proper HTML link that looks like: <a href='url'>link text</a>. Pass DT the escape = FALSE argument so that it doesn't escape the HTML code. The DT web page has an example of...

It is basically just an ID to uniquely identify a video. Technically, there is no need to hash it, but they do encode it into a string to make the ID a little more unreadable. Not specifically for YouTube URLs, but it is easy to create your own "hashed"...

Just do that $var = urlencode($dbvalue);//var would be url safe when you get the data back just do this $var = utf8_decode(urldecode($_GET['val'])); give this var value to the database hopefully it would be fine....

I assume BASE_URL has value like http://www.example.com/whatver and BASE_PATH is like /whatever. Then these values are equal. One little plus for BASE_PATH - if you change scheme from http to https, you don't need to check if BASE_URL has new https scheme....

Yes you can. Normally CI produce url like this base_url/Controller_name/Method_name. As you know controller name and method name cannot contain '-'(hyphen) so you cannot change their name. What can you do is use router to show the correct controller with corresponding url. Like you can write this code at your...

The code 302 refers to a relocation. The correct url will be transmitted in the location header. Your browser then fetches the file form there. See https://en.wikipedia.org/wiki/HTTP_302 Try https://repo1.maven.org/maven2/com/cedarsoftware/json-io/4.0.0/json-io-4.0.0.jar For FileUtils see How to use FileUtils IO correctly?...

Seems You're trying to use reserved name CI_Controller $newurl = base_url()."controller/method/".$e_email_app; or this was edited for question and You have a real name for controller and method? Also, please, check is encryption was success: $email_app = "test string"; $newurl = base_url("controller/method/".urlencode($this->encryption->encode($email_app))); $decoded = $this->encryption->decode(urldecode($newurl)); echo $decoded; // must be "test...