FAQ Database Discussion Community


Magento : How to get category page URL keys for different store views?

php,magento,url
I'm trying to get the page URL Key for category pages for different store views. Basically I have 3 stores set up in my Magento installation. Now I want to implement hrefhang tags in my category pages. But I cannot access category URL keys of other store views when I'm...

I want to hit url of another application in a yii framework application.How to do that?

php,url,yii
I want to hit url of another application in a yii framework application.How to do that? I can do it in my own app like this: <tr> <td> <?php echo CHtml::link('Agent', $this->createUrl('/agent/agent/admin')); ?> </td> </tr> But I want to hit some url outside by application. How to do that?...

Android BufferedReader does not read the whole response

java,android,url,bufferedreader
I have a problem with reading a ULR response. On Android it only reads around the half of the response. If I use the same code in a normal Java project everything works fine. try { String _output = null; URL url = new URL("http://example.com"); BufferedReader buffer = new BufferedReader(new...

Why/how does the browser decide ☃.net goes to xn--n3h.net

url,browser,unicode,character-encoding,iri
If we type into firefox or chrome http://☃.net/ It takes us to http://xn--n3h.net/ Which is a mirror of unicodesnowmanforyou.com What I don't understand is by what rules the unicode snowman can decode to xn--n3h, it doesn't look anything like utf-8 or urlencoding. I think I found a hint while mucking...

Selecting in document not working

java,url,jsoup
I'm trying to use Jsoup to extract the links in my html-code, but I get an exception saying: org.jsoup.nodes.Document cannot be cast to javax.swing.text.Document And I can't figure out why this goes wrong, since I've followed the tutorials found online. What my code looks like: String htmlCode = Jsoup.connect(urlToDownload).get().html(); Document...

Combining bookmarklets to create a toggle between two URL

javascript,regex,url,bookmarklet
This is basically a variant of Combining Bookmarklets to create a toggle between HTTP and HTTPS? I would like to combine the following two bookmarklets into one: javascript:q=(document.location.href);location=location.href.replace('dp','gp/aw/d') javascript:q=(document.location.href);location=location.href.replace('gp/aw/d','dp') i.e. basically switch between two directories on a server. This does not work (or only for one of the cases, i.e....

Django: html without CSS and the right text

python,html,css,django,url
First of all, this website that I'm trying to build is my first, so take it easy. Thanks. Anyway, I have my home page, home.html, that extends from base.html, and joke.html, that also extends base.html. The home page works just fine, but not the joke page. Here are some parts...

Is this possible with a pageswitch?

php,url,if-statement,include
Usually i would use url parameters for a pageswitch, lets say i got this switch so p is the page if(isset($_GET['p']){ $page = $_GET['p']; if(file_exists('includes/' . $page . '.php')){ // include the page } else { // include error page } } else { // include homepage } my url...

Trying to pass variable in url

php,url
I'm echoing this form: echo "<form action='/leaguemaster/fichaTorneio.php?id=" . $_GET['torneioid'] . "'>"; When I submit the form and it links to the page from the action, the variable I'm passing doesn't reach the page... /leaguemaster/fichaTorneio.php? I've done this in other pages and it worked, I don't know what's going on here....

Htaccess rewrite URL with virtual directory and 2 variables

regex,apache,.htaccess,url,rewriting
its my URL... result.php?team=arsenal&player=ospina I want to like this mysite.com/virtualdirectory/arsenal/ospina.html I tried this code.. cant work.. Not Found RewriteRule ^(.*)/(.*)/(.*).html$ result.php?team=$2&player=$3 [L] The requested URL /subfolder/arsenal/ospina.html was not found on this server. Apache/2.2.8 (Win32) PHP/5.2.6 Server at localhost Port 80 Thanks for helps, Best regards!!...

ajax request php class function

url,laravel,redirect
i have content listed in a div and i have a dropdown with various options to order and filter that content. I'm using ajax to filter/order that content and is working but i use other php page with the content i want on the div that has the content, like...

CodeIgniter URL parsing incorrectly

php,codeigniter,url
I have a code igniter site which I have enabled some special characters so that characters such as £ can be used in the URL: EG: http://mysite.co.uk/products/details/Product-name-£ When I click on the URL, it tries to take me to the product page and then redirects me back to the homepage....

why i am not able to read Html Content from a website in a file?

java,url
I have made a java program where in i can use any website to read its Html Content using Scanner class and Varargs.I am not able to get the output while i am using Scanner class and VarArgs. Below is the following Code. import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import...

Django: reverse(view_function) does raises NoReverseMatch

django,url,django-views
Reversing by view-name works, and reversing by view-method, too. But if the URLs use a prefix reversing by view-method does not work. At least in my case. Old code url=reverse('myapp:foo-view') New code. Both versions don't work url=reverse(foo_view) url=reverse(foo_view, prefix='myapp') Again, reversing by view-method works perfectly if the URLs have no...

Hiding param of struts.xml values in Struts 2

java,url,struts2,passwords,url-parameters
Is there any way to hide the param values in struts.xml as they are visible on the URL when I pass them from one action to another? <action name="BackToManagerIndex" class="Action.LoginAction" method="ManagerList"> <result type="redirectAction"> <param name="actionName">login</param> <param name="namespace">../Manager</param> <param name="User_Id">%{User_Id} </param> <param name="Password">%{Password}</param> </result> Here when ever the BackToManagerIndex action is...

Check if URL contains string then create variables with url strings

php,wordpress,url,cookies
I need to check if URL contains the term: "cidades". For example: http://localhost/site/cidades/sp/sorocaba So, if positive, then I need to create two or three variables with the remaining content without the " / ", in this case: $var1 = "sp"; $var2 = "sorocaba"; These variables will be cookies values in...

spaces in url ftp client in node.js

javascript,node.js,url,ftp
I use ftp Node.js and I'm able to read files and folders but only folders in their URLs there is no spaces. this works: var ftp = require('ftp'); var path = "app/LaundryMachine"; var client = new ftp(); //connect properties var config = { host: '***.net', port: 21, user: '***', password:...

What is the semantic HTML tag to display for URLs that are not links?

html,html5,url,tags,semantics
I have a search engine plugin that outputs results in a basic structure: <a href="page url"> <div class="searchResult"> <h3>Page title</h3> <p>Page url</p> <p>Page <meta> description</p> </div> </a> The plugin is designed to integrate into an existing website so it has no default styling. However, websites are supposed to be usable...

Server returned HTTP response code: 503 for URL

java,api,url,http-status-code-503
Getting "Exception in thread "main" java.io.IOException: Server returned HTTP response code: 503 for URL" error when I make multiple calls to Amazon Product Advertising API. Is the reason overloading of the service? One Possible solution is to use Thread.Sleep(milliseconds) method. But is there any other more sophisticated solution? Like proxies...

Punycode for Unicode query parameter

java,url,unicode,punycode
I am trying encode some Unicode URLs with Punycode. These URLs have a query parameter that contains non-ASCII characters, for example: https://en.wiktionary.org/w/index.php?title=Clœlia&printable=yes The problem is, when I try to do it in Java, the resulting URL is wrong: String link = "https://en.wiktionary.org/w/index.php?title=Clœlia&printable=yes"; link = IDN.toASCII(link); // -> link = http://en.wiktionary.org/w/index.xn--php?title=cllia&printable=yes-hgf...

IOS - SWIFT - CollectionView With images, loading URLs from array

ios,image,url,uicollectionview
I have a collection view and array with URLs of different images. and when i launch the app, collection view starts to load images through the array: func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { var cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as! CellView var url = arr[indexPath.row] var urls...

SEO and user-friendly URLs for multi-language website

url,seo,multilingual,usability
Let's say I have a website that has 2 languages, one uses Latin and the second one Cyrillic transcriptions in URLs. For example: example.com/link example.com/ссылка My question is which is more user and SEO friendly, if I leave them as is or if I add the language prefix, so they'd...

Why won't this work at changing the URL of a web View (resolved but it is now opening a new browser window instead of keeping it in the app???) [closed]

android,url,webview
I am making a portfolio and I want it to change to a new URL to load after you click Next or the nextButton (mNextButton variable). this is the code for the activity that has the webview on it. package com.dredaydesigns.dredaycreativeportfolio; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import...

How to use hyper linking in Razor without Url.Action or Html.Action

c#,asp.net-mvc,url,razor,mono
There are 4 ways to hyperly link views in ASP.NET MVC as far as I know: @Url.Action @Url.ActionLink @Html.Action @Html.ActionLink I can use them as, for example: <a [email protected]("ActionName","ControllerName")> Test </a> Which generates: <a href="ControllerName/ActionName"> Test </a> Is there a way to generate the Url part i.e. "ControllerName/ActionName" in ASP.NET...

uriBuilder returns http:/ instead of http://

java,url,jersey,uri
I use this code: UriBuilder builder = UriBuilder .fromPath(Constants.LIVEMAP_BASE_URL_US) .scheme("http"); return builder.build().toString(); how can it be that it has generated "http:/" instead of "http://" ? returned value = http:/livemap-tiles1.waze.com/tiles/internal?lineGeom=......

Php encrypt url

php,apache,codeigniter,url,encryption
i need your help , i am using codeigniter php to do url encryption, i use default codeigniter encryption class , without changing the configuration, but when i encrypt the url show me error "Object Not found , the request url was not found on this server" the way i...

web.com/post/post-title redirects to web.com/post-title

wordpress,url,permalinks,slug
I'm having a complain of the SEO guy because a post url is not like this web.com/blog/post-title But like this web.com/post-title And even web.com/blog/post-title redirects to web.com/post-title How could I restore normal behavior? it looks like they are being treated as page but they work as posts in web.com/blog...

issue with urlencode in browsers view (php/html)

php,url
I want encode my urls in my webpage... I use this method: <a href="<?php echo urlencode('http://www.example.com/dir dir'); ?>" but in output in browsers the address change to this: http://www.example.com/http://www.example.com/dir dir how can I use urlencode to avoid that problem...

Upload info that appear when share web link on Facebook

wordpress,facebook,url
I have made a website. I did it with wordpress, making a custom theme. All works fine, but I have a problem. When I share any url on facebook, the info is not showed correctly. Only shows correctly if I go to open graph stories and I fetch the newest...

Encrypted Querystring in URL getting changed to lowercase in Outlook

c#,asp.net,email,url,encryption
I am providing a CANCEL button in a registration email, so that the user can click the link and cancel their registration. This works fine except Outlook is converting links to lowercase. So when the user clicks the link, I can't decrypt the URL because the encrypted querystring is now...

Rate Me URL on app store before App Published

ios,xcode,swift,url,rate
I am implemebting a rate me fucntion in xcode 6.1 - Swift. I am following this tutorial and my question is how do I find the URL for my app on the app store before it is published i.e. is there a default URL we add the App Name to...

Fetching URL vars into form and submitting to other page

php,variables,url
I have this url: torneioJogo.php?equipaleft=24&equiparight=25&torneioid=8 The following code is in this url... <form method='GET' action='torneioJogoSub.php?'> //THESE INPUTS DOWN HERE <input type="hidden" name="equipa1" value="<?php $_GET['equipaleft'] ?>"> <input type="hidden" name="equipa2" value="<?php $_GET['equiparight'] ?>"> <input type="hidden" name="torneioid" value="<?php $_GET['torneioid'] ?>"> <div id="pontos"> <input type="submit" name="win1"...

FullCalendar event directing to wrong url

javascript,php,mysql,url,fullcalendar
So I have set up FullCalendar to my site. I used this tutorial. Everything works fine except the urls I add to events on my calendar. So when I've added a URL to an event it should direct me to that url when I press on the event. For example,...

PHP Relative URL not working

php,html5,url
I have been attempting to set up a template header in PHP that will be used on all of my pages. However, I am getting several errors when I attempt to use root relative paths. I have looked at several other questions, and have not been able to fix my...

How to use PHP to recognising (and not validating) URL

php,url,protocols,strpos
I'm aware of filter_var() and it's FILTER_VALIDATE_URL filter. The point is there are some URLs which are exist but not count as a valid URL and I need to verify them. For example, URLs with spaces. At the moment I am checking only those protocols that application is interested in...

Open website url links with parameter by using a batch file

url,batch-file,parameters
I am trying to open some website url links with a parameter in my browser. I made a batch file using this code : @echo off start "images" "www.images.com/1000/image.jpg" start "images" "www.images.com/1001/image.jpg" start "images" "www.images.com/1002/image.jpg" ... ... start "images" "www.images.com/5000/image.jpg" All I want is to create a For loop that...

AngularJs json URL changer

javascript,json,angularjs,url
I'm working on some mega simple weather app in Angular for practice reasons and i'm stuck.. i have a angular json feed like this: app.factory('forecast', ['$http', function($http) { return $http.get('http://api.openweathermap.org/data/2.5/weather?q=Amsterdam,NL&lang=NL_nl&units=metric') .success(function(data) { return data; }) .error(function(err) { return err; }); }]); and it loads the feed in to the index.html....

Force WWW when URL contains path using .htaccess

.htaccess,session,url,redirect
I'm having a problem with my URL and my sessions. I wish to have ALL website pages be forced to use www. As it looks like now, the website looks like this: www.example.com into www.example.com example.com into www.example.com www.example.com/example/ into www.example.com/example/ example.com/example into example.com/example (this is what's wrong) This is...

C# mvc4 - direct URL to controller

c#,asp.net-mvc-4,url,redirect
I have an external URL that points directly to a function in my controller but when I click on it for the first time, instead of reaching the page, I get to the home page. However, on the second click (and the following ones), I can reach the desired page....

Chrome Context menu is generating incorrect link

javascript,google-chrome,url,google-chrome-extension,contextmenu
I have written a context menu code similar to Google's Search in Google for '...' The code is working fine up to showing menu option and clicking. After selecting the menu option, new tab is created but Chrome tries to load chrome-extension://acpffpbkehpfofhgilcophibgbkhmmba/https://www.google.co.in/search?q=Wikipedia instead of https://www.google.co.in/search?q=Wikipedia. Please suggest what could be...

Rails view URL to another website

html,ruby-on-rails,url
In my view I display a url to another website like so: <a href="url"><%= @article.url %></a> However, when I click it, my website crashes(it probably interprets it as a url to another page within the website). How can I change this code such that the url takes me to another...

Python How To Import And Use Module With One Line

python,string,url,import,python-import
My question is a fairly straight-forward one. I have this code that loads the natural gas storage numbers from the internet. from urllib.request import urlopen print(int(str(urlopen("http://ir.eia.gov/ngs/wngsr.txt").read()).split("\\n")[4].split(" ")[2])) What I want to know is, how could I do this in one line? More specifically, I was wondering how I could get...

Codeigniter URI Class how can i use – hyphen instead _ underscore?

php,codeigniter,url
i tried create some controllers, models and views with - hyphen, but i get php error always so i am using underscore right now. so my url is: http://localhost:8888/ci/index.php/get_artist_discography/artist_name i would like be like that: http://localhost:8888/ci/index.php/get-artist-discography/artist-name its possible have urls with - hyphen in codeigniter? my code: /controllers: <?php include...

Clean Urls with regular expression

regex,url,notepad++
i have Data in thousand lines like http://xxxx.com/xxx-xxx-xxx-xxxx/ 60% 2 Weekly 2014-01-01 00:00 want to remove everything after / in every url (output should be in clean url like below) http://xxxx.com/xxx-xxx-xxx-xxxx/ Thanks ...

Java - Getting the URL's parameter

java,url,parameters,playframework-2.0
I have a URL something like this I'm using play framework HTTP Routes: GET /students controllers.Application.Get() POST /students controllers.Application.Post() PUT /students/{studentNo} controllers.Application.Put() How will I get the {studentNo} value? For example I'm using a postman(rest client) and I typed something in the url http://localhost:9000/students/2012111222 , how will I get the...

Is there a difference between a “key” and “key=” URL query string?

javascript,url,firefox,query-string
For example, when we parse this query string: foo&bar=&baz=123 Firefox’s implementation of the standard URLSearchParams type (spec) assigns an empty string value to both foo and bar: Does this mean that foo and foo= are effectively the same inside a query string? Or is it a bug in Firefox?...

Run tomcat application from any subdomain, subfolder or ROOT

java,url,tomcat,path
I'm new to java web development so bear with me. I have created a application which runs on localhost:8080. The application uses a simpel MVC setup (controller servlet forwards request to jsp page). If I deploy my application to a remote server in a subfolder (www.myserver.com/myapplication) the application does not...

ReactJS route optional ID URL param

url,routes,reactjs
So, I've tried all this but none of them work. <Route name="create-course" handler={CreateCourse} path="/course-builder/create-course/{:id}" /> <Route name="create-course" handler={CreateCourse} path="/course-builder/create-course/[:id]" /> <Route name="create-course" handler={CreateCourse} path="/course-builder/create-course{/id}" /> variants of the same error: Error: Invariant Violation: Missing "id" parameter for path "/course-builder/create-course/{:id}" /{:id?} one doesn't throw an error but URL becomes...

Servlet path is not included in

jsp,url,servlets,jstl
I have a simple Java Webapp (eg. test) containing two different SpringMVC application. My web.xml maps them as: <servlet-mapping> <servlet-name>web</servlet-name> <url-pattern>/web/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>restful</servlet-name> <url-pattern>/restful/*</url-pattern> </servlet-mapping> Inside the web part I'm using "classic" libraries, such as JSTL core. I don't understand how to avoid JSTL c:url tag ignoring the URL...

jQuery - Using indexOf() with match()

jquery,regex,url,match,indexof
I am currently working on an user script made for YouTube using Firefoxs addon 'Greasemonkey' and came across a deadend.. Is it possible to check the url whether or not the url contains a specific string? I tried using indexOf() along with match() since I want it to check the...

iOS - how to scale to mobile device given only a url

javascript,html,ios,iphone,url
i have a weblink from an external site. All i have is this link, it looks something like this: www.mysite.com?locale=french the site is not mobile yet so it does not scale to mobile device. Remember this site is not mine and all i have is a link. How can i...

CakePHP 1.3 - Extract URL GET parameters

php,url,cakephp,get,cakephp-1.3
I have CakePHP 1.3.2 application working with similar URLs: /controller/action/name1:value1/name2:value2.html I'm trying to extract the values after the : sign specified by the names before that. I can see the whole URL with no problem using $this->params['url'], however, I can't get the value itself using neither $this->params['name1'], nor $this->params['url']['name1']. Any...

How to short url address with .htaccess

.htaccess,url,url-rewriting
My code produce URL like this: http://domain.com/netRacuni/tcpdf/examples/pdf.php?key=bi5u3w2zys1v9sqijomsqyya5ge2v5 How I can make it like this: http://agroagro.com/bi5u3w2zys1v9sqijomsqyya5ge2v5 so only domain.com+key to be there?...

What is Fragment URLs and why to use it

php,url,hash,fragment-identifier
I am new in PHP Development. Today I came across the interesting topic URL fragmentation specifically the '#' part of the URLs. I searched about that It says it's like www.example.com\foo.html#bar. But I don't understand why this "#bar" is needed. and how to read it by PHP?...

Golang: Passing a URL as a GET parameter

url,go,get,parameter-passing,url-parameters
I want to get an URL as a get aparameter ex: example.com?domain=site.come?a=val&b=val the problem when i use query := r.URL.Query() domain := query.Get("domain") to get the domain name it give just domain=site.come?a=val I think because when the r.URL.Query() meet & it consider it as a new parameter does anyone know...

index.php url need to hide from homepage of php website

php,url
The website www.indowesterncaterers.com/ has menu in header.php <ul> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'index.php'){echo 'active'; }else { echo ''; } ?>"><a href="index.php">Home</a></li> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'about-us.php'){echo 'active'; }else { echo ''; } ?>"><a href="about-us.php">About US</a></li> <li class="<?php if(basename($_SERVER['SCRIPT_NAME']) == 'plan-your-wedding.php'){echo 'active'; }else {...

What URL to use to link other JSF pages in a JSF project

jsf,url,jsf-2,hyperlink
I am confused about how to link between files in a Java Server Faces project, when some of the files are in sub-folders. (I was going to attach screenshots so you can see the Nebeans project view, and files view of the example I am trying.... but I'm not allowed...

How to write the url patterns. Python, Django

python,django,url
I need to write URLPatterns for any string(max length - 5) and then pass this URL pattern to function. I tried do this: url(r'^([a-z]{5})$/', open) But it does not work: page not found. What I do wrong?...

Getting HTTP 302 when downloading file in Java using Apache Commons

java,file,url,apache-commons,fileutils
I am using the following method to download a file off the internet: try { URL url = new URL("http://search.maven.org/remotecontent?filepath=com/cedarsoftware/json-io/4.0.0/json-io-4.0.0.jar"); FileUtils.copyURLToFile(url, new File(jsonerFolder.getParent() + "\\mods\\json-io-4.0.0.jar")); } catch (Exception e1) { logger.error("Downloading json-io failed with an exception"); e1.printStackTrace(); } But the downloaded file is not a jar, rather, it is an...

Rails less url path change

ruby-on-rails,ruby,url,path,less
Developing a Rails application with the less-rails gem I found something unusual : // app/assets/common/css/desktop/typo.less @font-face{ font-family:'SomeFont'; src:url("fonts/db92e416-da16-4ae2-a4c9-378dc24b7952.eot?#iefix"); // ... } The requested font is app/assets/common/css/fonts/db92e416-da16-4ae2-a4c9-378dc24b7952.eot This font is compiled with less and the results is : @font-face { font-family: 'SomeFont'; src: url("desktop/fonts/db92e416-da16-4ae2-a4c9-378dc24b7952.eot?#iefix"); //... } Do you know why is...

Django: import two different views to same urls.py?

python,django,url,views
I was wondering if it is possible to link to two different views.py files (in different directories) within one urls.py, and how this might be done? More specifically, I am looking for a way to include the views.py from 'myapp' directory in urls.py in 'details' directory together with the views.py...

Swift: convert JSON from URL to multiple strings

json,swift,http,parsing,url
I am on a difficult part of swing and after hours or investigations, I have found informations but not enough to perform what I look for. I'am sending a POST http request to a server, this one send me back a JSON converted as an NSDictionnary: let json = NSJSONSerialization.JSONObjectWithData(data,...

How do you add NAME. to domain.com so you get NAME.domain.com and place in DNS

url,dns
How do you create a name in a DNS such that you have a valid url of NAME.domain.com? I currently have an ip address assigned to domain.com. I want to add a couple of more names. to my dns so I have the following naming convention, domain.com IpAddr1 dev.domain.com IpAddr2...

PHP - url path as parameters

php,url,parameters
My question might be silly, but I have no idea how to do it. I'm using PHP for creating websites. To change content of the page there is script which includes different file based on url parameter, eg. http://example.com/index.php?page=news This loads some news page. When I want to load some...

How do I use jQuery to redirect to variable URL?

jquery,variables,url,redirect,button
I'm trying to make a photo gallery for my portfolio. I've hit a wall and can't work out why this won't work: It's a button that sends you to a URL depending on your current URL. In this example, the user is at "/project1.html" and by clicking the next button,...

How do I load an HTTP URL with App Transport Security enabled in iOS 9?

ios,url,nsurl,ios9
So, the new beta SDK of iOS released last night has "App Transport Security" which encourages developers to use https instead of http. In principle, this is a great idea, and I already use https in our staging/production environments. However, I don't have https set up in my local development...

Hiding elements based on URL

javascript,url,hiding
I'm trying to hide an element that is created dynamically, below is the code I have tried but for some reason the menu still appears after the JavaScript has run. It works in an html page, but not in asp.net. <script type="text/javascript"> if (window.location.href.indexOf("http://www.test.com/xzy") != -1) { $("#Menu").hide(); } </script>...

Build urls with parameters

php,url
I'm trying to generate a URL similar to https://website.com/oltp-­‐web/processTransaction?REQUEST_TYPE=2&MID=5 I'm using PHP's http_build_query function but it's not generating a proper URL. Code sample: <?php $parameters =array( 'https://pguat.paytm.com/oltp-­‐web/processTransaction?', 'REQUEST_TYPE'=>'2', 'MID'=>'5'); $url = http_build_query($parameters); echo $url; ?> ...

Saving urls in an array and access it or display it

arrays,swift,url
I'm not able to save multiple urls in an array any way to solve this problem , thanks in advance let audioUrl = NSURL(string: "http://trialwebsite.ucoz.com/GurujiHymns/02_BIGDI_MERI_TAQDIR_KO_Singer_Masoom_Thakur.mp3") ...

How to remove the :port number from the end of an IIS URL?

url,iis,port
In IIS, I noticed when you use the default ports (80 for http and 443 for https) the port number doesn't display at the end of the URL in your browser. However, if you use a different port it will display. Example: Default port generates link: http://www.example.com Custom port generates...

URL Rewriting doesn't work - Apache, local server

php,apache,.htaccess,url
I have an website on my localserver (with Apace) and i want to rewrite urls. I have .htaccess file. I have RewriteEngine ON (on Apache) index.php <a href="post.php?post=<?php echo $row['postID'];?>"><h4><?php echo $row['postTitle']; ?></h4></a> When someone press on the title of post will be redirected to post.php/post=postID I want to...

How to convert special characters of an url in cakephp3?

url,cakephp-3.0
I have an upload folder in webroot that contains my pictures. And I read picture path from database. picture->path = 'uploads\pictures\pic1.png' When I try to show pictures with line below echo $this->Html->image('/'.$picture->path); browser could not show pictures. This is the result html that generated with cakephp <img src="/projects/bookmarker/uploads%5Cpictures%5Cpic1.png" alt=""> I...

htaccess rewrite rules conflict

php,.htaccess,url,mod-rewrite
www.example.com/category/sub_category/Having problem with the rewririte rules in .htaccess file. my current .htaccess file looks like this. 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] RewriteRule ^([0-9]+)$ gallery.php?id=$1 [NC,L] I'm trying create urls like the following. www.example.com/product_name/1...

JAVA url = new URL () malformedURLexception

java,url,malformedurlexception
I was trying to build a crawler that collects HTML sourcecodes from websites, which I have in a .csv file. Everything seems to be working fine whenever I place the link in url = new URL ("http://example.com") but whenever I try to place the link in a variable ("text" in...

how is youtube url constructed?

php,url,url-rewriting,youtube
I am wondering how the youtube url is constructed? for example https://www.youtube.com/watch?v=L7Jd910Bw84 how is the value L7Jd910Bw8 created, is it a hash value ? is there any PHP function to use for creating this kind of urls? how is it possible to make sure that the two diffrent objects dont...

In WordPress how do I pass multiple variables into the URL and retrieve them?

javascript,php,wordpress,url,get
For some reason I can only retriever the first variable, in this instance, "product_category" out of the URL http://localhost/coffeesite/?product_category=coffee&brand=bourbon . I'm outputting javascript to confirm that I've set the variable, but again, only coffee will be alerted, and not brand. I'm using WordPress's 'get_query_var'. See code below: <?php echo '<script>...

Get Parameter from URL using PHP

php,url,redirect
I have a url: domain.com/?city=newyork&postback=test I am currently successfully passing the postback parameter using the PHP below. However, I can not figure out how to also pass the city parameter. <?php session_start(); if(isset($_SESSION['postback'])) { if($_GET['postback'] == "") { header ("Location: qualify-step2.php?postback=".$_SESSION['postback']); } } ?> Can someone please help me edit...

PHP : How to set array Value with $_GET

php,url,get,value
i tried to set the value of the $_GET[] into an array object this is my code $X=array( 'status_1'=>'"'.$_GET['hasil_1'].'"', 'status_2'=>'"'.$_GET['hasil_2'].'"', 'status_3'=>'"'.$_GET['hasil_3'].'"', . . 'status_17'=>'"'.$_GET['hasil_17'].'"'); //Faktor Klasifikasi $n = 'derajat'; //nama tabel $table='tabel'; classify($X,$n,$table); it's not working . this is the url...

Using URL vs Filepath to include css?

php,css,url,path
Which one is better ? Using URL to include css ? <link rel="stylesheet" href="<?php echo BASE_URL; ?>/css/style.css"> Or, using filesystem ? <link rel="stylesheet" href="<?php echo BASE_PATH; ?>/css/style.css"> BASE_URL containes the base url of the app, and BASE_PATH contains the file path to the base of the app....

Ruby - WebCrawler how to visit the links of the found links?

ruby,url,hyperlink,web-crawler,net-http
I try to make a WebCrawler which find links from a homepage and visit the found links again and again.. Now i have written a code w9ith a parser which shows me the found links and print there statistics of some tags of this homepage but i dont get it...

How to add .php extension to Codeigniter 2.x controller URL's

php,.htaccess,codeigniter,url,controller
I am using Codeigniter 2.x for a project and have limited knowledge on .htaccess etc. I've created an RESTful api which can be accessed via "api" controller's "getfeedback" function and was able to remove the index.php from the URL using .htaccess rules. Example That currently works (without .php extension): www.example.com/api/getfeedback?param=abc&param2=defghi...

How to build custom URL by adding ?¶ms in Angular?

javascript,angularjs,url,angularjs-routing
I'm trying to build a custom URL and update the URL as the user selects items in my dashboard. For example, after clicking a few items the URL could/should look like: #/dashboard?&portfolio=GOOG&ticker1=GOOG Currently the URL only ends in /dashboard (console.log($location.path());) How would I update the $location.path() to add params like...

Get special character from Query string in classic asp

url,asp-classic
I have an URL like ViewProfile.asp?mem_id=phani#1&page=1 I am trying to get the value of mem_id by using request.Querystring("mem_id"), I am getting only phani. The part #1 of it is not coming to the variable. I have used HttpUtility.UrlDecode() and Server.UrlDecode(). I am not sure whether these are there. Can someone...

What is wrong with this Google Elevation API URL?

python,google-maps,url,polyline,http-status-code-400
I am making an application using mainly Python to find the most fuel efficient route using primarily Google Maps data. I have been using the Encoded Polyline Algorithm to get elevation data, as well as a small Python module for the conversions. Normally, the conversion from LatLngs into polyline works...

Iframe not passing url parameters

html,variables,url,iframe,parameters
I am loading a web page inside an iframe. If I load the page without the iframe I using the same url it works as expected. However if the iframe loads the url it doesn't work. I have tried googling it and all I can seem to find is how...

How can I detect a URL really exists despite a 301 or 302 redirect?

python-2.7,url
I am looking to write a function in python to confirm the existence of files that might exist on a remote server. Some of the downloads I am checking, however, are behind 301 or 302 redirects. I have tried using the requests module as follows: def exists(path): r = requests.head(path)...

Hot to use Tornado to get the url parameter?

python,url,tornado
Here is an example www.example.com/abc/def I just wanna get "abc" and "def" without "/".Is it possible? Is it nice if I used self.request.uri and got "abc/def" first ,Then turn it to an string ,and using split('/') to split it so I can get "abc" and "def" I don't feel comfortable...

How to generate a new url for each site

javascript,php,html,url,website
I'm currently making a website with the system of replacing content of the main div in the "body" part. Now I figured out that I messed up a bit because every content will be placed in the same url. Do you have a idea of fixing this? HTML/PHP(index.php): <html> <head>...

Django URL namespaces - the template has to know its namespace?

django,url,namespaces
I've been tinkering with (my first) Django project that started out with Django 1.6 and has just recently moved to Django 1.8. I've also been working through Django Patterns & Best Practices, learning how I should have structured it all along :-) My project has several sub-apps and a typical...

Regular Expression: Insert between two characters

regex,url,sublimetext2
My regular expression skills aren't great. I'm using Sublime Text and I want to replace everything between the first two slashes (/) with a different name. (This is for a URL flattening project.) IMG SRC="/testing/graphics/real.gif" ...

ruby: validating https urls

ruby,url
Actually i'm using that one for validating https urls: uri = URI.parse(url) response = Net::HTTP.start(uri.host, uri.port) do |http| http.head(uri.path) end response.is_a?(Net::HTTPSuccess) || response.is_a?(Net::HTTPRedirection) Exists a similar solution for https url?...

Switching language with href

php,html,url
I have three languages running on my website and would like to have working buttons to switch languages on the bottom of my page. The problem is, that the homepage (index.php) requires the suffix ?lang=X while the other pages, (index.php?contact, index.php?about etc) require &lang=X in the URL. I've set up...

GitHub API returned Url meaning

git,api,url,github,github-api
Take this very simple API as example, https://api.github.com/users/zhuhuihuihui In the JSON formatted response, you'll find something like following, "following_url":"https://api.github.com/users/zhuhuihuihui/following{/other_user}", "gists_url": "https://api.github.com/users/zhuhuihuihui/gists{/gist_id}", "starred_url": "https://api.github.com/users/zhuhuihuihui/starred{/owner}{/repo}", Ok, I know like the following_url, starred_url is something like a sub API which you can call to fetch who that user are following, or what repos...

Convert a column of text URLs into active hyperlinks in Shiny

r,url,hyperlink,datatables,shiny
I am creating a user interface for a pathway enrichment program. The results are shown in a table as shown below. Below is a snippet showing that I am using DT::renderDataTable and DT::datatable to output the table in a tab. spia_out() is just a reactive function that runs the pathway...

Coinbase Oauth2 - token request URL - “404 Not found”

url,oauth-2.0,coinbase
First steps of the Coinbase Oauth Authorization seem to work fine. I request the customer code via the following URL: "https://www.coinbase.com/oauth/authorize?response_type=code&client_id=XXXXXXXXXXXXXXXXXXXX&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=user+balance" I get back the code via URL.. Then trying to request the token with given CODE and CLIENT SECRET and CLIENT ID:...

PHP $_GET request not working

php,url
I'm new to PHP and the answer might be easy but even after several search I didn't manage to fix that simple issue. So I'm trying to get params from the URL using $_GET, here is a sample code: <?php $ee = $_GET["search"]; $fp = fopen('results.json', 'w'); fwrite($fp, "ee :...

Changing URL as long as you are scrolling the webpage

javascript,html,url,browser,browser-history
I was seeing the NASA's press release / image gallery, (you can see it here) and it has come to my attention that as I'm scrolling down the webpage and seeing different posts, the URL in the address bar was changing (I was using chrome, but tried in Internet Explorer...

NSURLRequest has serious problems in iOS

ios,url,caching
I am unable to delete the cache for a request, on top of that I can't use NSURLRequestCachePolicy to Ignore local and remote cache data. What to do? It seems impossible to just ignore the cache. Some things that I have tried but they didn't work: Removing the cache for...

Multilingual website and url redirection to the default language chosen by me

url,url-redirection
I have a website with two languages, English and Russian. My domain url for each language will be as such: www.mydomain.com/en/ and www.mydomain.com/ru/ How do I redirect visitors to www.mydomain.com/en/ when they type: www.mydomain.com How will my url be shown in google search, will it be shown as: www.mydomain.com OR...

Refresh window on url change - AngularJS

javascript,angularjs,url
Well I've a webpage let it be the destination written in AngularJS which is accessed from another webpage(not AngularJS) let it be the source. So from source if I click a button it opens the destination webpage in a new window. Source will have a drop down box based on...