Search Results

Search found 18568 results on 743 pages for 'url shortener'.

Page 32/743 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Zend framework - duplication in translated url

    - by tomasr
    I have these URLs cz/kontroler/akce en/controller/action Is used transatable route and works it like charm. But problem is, that when you will write cz/controller/akce it works as well. In generally when you have cz/something-in-czech en/something-in-english which route to someController, will be works still cz/some en/some because it is really name of controller. How solve this duplicity content issue?

    Read the article

  • URL routing in an MVC framework - PHP

    - by Walderman
    I'm developing an MVC framework in PHP from scratch; mostly for the learning experience but this could easily end up in a live project. I went through this tutorial as a base and I've expanded from there. Requests are made like this: examplesite.com/controller/action/param1/param2/ and so on... And this is my .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA] So all requests go to index.php and they are routed to the correct controller and action from there. If no controller or action is given, then the default 'index' is assumed for both. I have an index controller with an index action, which is supposed to be the home page of my site. I can access it by going to examplesite.com (since the index part is assumed). It has some images, a link to a stylesheet, and some scripts. They are linked with paths relative to index.php. I thought this would be fine since all request go to index.php and all content is simply included in this page using php. This works if I go to examplesite.com. I will see all of the images and styles, and scripts will run. However, if I go to examplesite.com/index, I am routed to the correct part of the site, but all of the links don't work. Does the browser think I am in a different folder? I would like to be able to use relative paths for all of the content in my site, because otherwise I need to use absolute paths everywhere to make sure things will show up. Is this possible?

    Read the article

  • How to get image from relative URL in C#, the image cannot be in the project

    - by red-X
    I have a project where I'm loading relative image Uri's from an xml file. I'm loading the image like this: if (child.Name == "photo" && child.Attributes["href"] != null && File.Exists(child.Attributes["href"].Value)) { Image image = new Image(); image.Source = new BitmapImage(new Uri(child.Attributes["href"].Value, UriKind.RelativeOrAbsolute)); images.Add(image); } Where the "child" object is an XmlNode which could looks like this <photo name="info" href="Resources\Content\test.png"/> During debug it seemd images is filled with actual images but when I want to see them in any way it shows nothing. Weird thing is when I include the images in my project it does work, I however dont want to do that since my point for using an xml file is so that it would be lost since you'd have to rebuild the program anyway after a change.

    Read the article

  • Replace URL with a link using regex in python

    - by user122750
    how do I convert some text to a link? Back in PHP, I used this piece of code that worked well for my purpose: $text = preg_replace("#(^|[\n ])(([\w]+?://[\w\#$%&~.\-;:=,?@\[\]+]*)(/[\w\#$%&~/.\-;:=,?@\[\]+]*)?)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\3</a>", $text); $text = preg_replace("#(^|[\n ])(((www|ftp)\.[\w\#$%&~.\-;:=,?@\[\]+]*)(/[\w\#$%&~/.\-;:=,?@\[\]+]*)?)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\3</a>", $text); I tried around in Python, but was unable to get it to work.. Would be very nice if someone could translate this to Python :)..

    Read the article

  • Human readable URL causes a problem in Ruby on Rails

    - by TK
    I have a basic CRUD with "Company" model. To make the company name show up, I did def to_param name.parameterize end Then I accessed http://localhost:3000/companies/american-express which runs show action in the companies controller. Obviously this doesn't work because the show method is as following: def show @company = Company.find_by_id(params[:id]) end The params[:id] is american-express. This string is not stored anywhere. Do I need to store the short string (i.e., "american-express") in the database when I save the record? Or is there any way to retrieve the company data without saving the string in the database?

    Read the article

  • Page URL and database organization.

    - by shurik2533
    I want that its name would be the page address. For example, if page has heading "Some Page", than its address should be http://somesite/some_page/. "some_page"-name generated by system automatically. "some_page" - is the unique identifier of page. The problem in that the user in the future can enter a name which already exists that will cause an error. It is necessary to find an optimum variant of the decision of a problem for great volumes of the data. I have solved a problem as follows: The page identifier in a database is the name of page and a suffix which is by default equal to zero. At page addition there is a check on existence. If such page does not exist, the suffix is equal 0 and its name is "some_page", if page is exist, than - search for the maximum number of a suffix and suffix=suffix+1 and page name become "some_page_1". For this I create in a database the compound key from fields "suffix" and "pageName": Table Pages suffix|pageName |pageTitle 0 |some_page |Some Page 1 |some_page |Some Page 0 |other_page|Other Page Addition of pages occurs through stored procedure: CREATE PROCEDURE addPage (pageNameVal VARCHAR(100), pageTitleVal VARCHAR(100)) BEGIN DECLARE v INT DEFAULT 0; SELECT MAX(suffix) FROM pages WHERE pageName=pageNameVal INTO v; IF v >= 0 THEN SET v = v + 1; ELSE SET v = 0; END IF; INSERT INTO pages (suffix, pageName) VALUES (pageNameVal, v, pageTitleVal); END; Whether there are more the best decisions?

    Read the article

  • Manipulating/changing adressbar link Help

    - by Karem
    I am out of my own "ideas" going through this. I have a album viewer. When you click next I want the adressbar to hang with it, e.g if you start on ?photoid=1, and click next (next picture appends and stuff), and then i want it to say ?photoid=2. Now I cant make it say ?photoid=2 without changing/manipulating, and this you cant do without HTML5. I have made a script in HTML5 that works fine, but then I need to take care of those who dont have HTML5(only chrome, ff4 etc supports html5) Made the script from this( https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history ) I thought of adding #photoid=2 so, ?photoid=1#photoid=2 and then check if theres anything in # then use that instead of the $_GET.. But apparently you cannot do that as # is client side handled and never sent to the server. So what should I then do? Any suggestions please to make a workaround this? I checked facebook, what they did to IE users, and I could hear that it "clicked" (the annoying click sound from IE) twice.. the first was to get to the next picture, the second click sound changed the adressbar?!(how?). And then I also thought hey, html5 is only supported in ff4, and I got ff3.6, and they manipulate the adress bar url when you browse through the album photos, exactly like how I wanted (and what I have written for but it only works in Chrome and ff4..?). How could they do that?

    Read the article

  • Absolute URL Path for PHP Website

    - by kakaajee
    Hi friends, I am working on a website in a CMS site. I have provided a link in my footer file e.g blogs.php. This page is at the root like "http://www.example.com/new_cms/blogs.php" When I moves to other files link like "http://www.example.com/new_cms/forums" the footer link is changed to "http://www.example.com/new_cms/forums/blogs.php" but the blogs.php page resides at path "http://www.example.com/new_cms/" . I tried different $_SERVER[] variables but got no luck to get the above path "http://www.example.com/new_cms/" means the server name with the directory where the project is currently running from. Any one have idea how to get it done will be a great help. Thanks

    Read the article

  • How to successfully Rewrite a URL with .htaccess

    - by Ian Storm Taylor
    Hello. I am trying to rewrite mysite.com/broadcasts to mysite.com/feed so that it will show up in the location bar as "broadcasts" but actually go to /feed. Here is what I have in the .htaccess file: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^broadcasts(/)?$ /feed/ </IfModule> But this isn't working... I get a 404 error. Wondering if I'm doing something stupidly wrong. Thanks!

    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

  • Get username from URL in PHP

    - by pojomx
    Hi, i want something like this: http://www.someniceandreliableurl.com/username and catch the username. I want to make something like twitters/facebook/etc quick urls... twitter.com/username How can i make something like this with php? =) thank you in advance.

    Read the article

  • Url mod_rewrite for static chained pages

    - by user1121487
    How can I achieve this with mod_rewrite? from: .com/index.php?menu=home to: .com/home AND from: .com/index.php?menu=home&list=hello to: .com/home/hello ALSO (without the folder hierarki) from: .com/index.php?menu=home&list=hello to: .com/hello I'm using this for the first one: RewriteRule ^([^/\.]+)/?$ index.php?menu=$1 [L] But how to I connect them if there are multiple variables? Tried this: RewriteRule ^([^/]*)/([^/]*)?$ index.php?home=$1&list=$2

    Read the article

  • URL decoding Japanese characters etc. in Java

    - by DanieL
    I have a servlet that receives some POST data. Because this data is x-www-form-urlencoded, a string such as ???? would be encoded to &#12469;&#12508;&#12486;&#12531;. How would I unencode this string back to the correct characters? I have tried using URLDecoder.decode("encoded string", "UTF-8"); but it doesn't make a difference. The reason I would like to unencode them, is because, before I display this data on a webpage, I escape & to &amp; and at the moment, it is escaping the &s in the encoded string so the characters are not showing up properly.

    Read the article

  • PHP: question about passing parameters in URL's

    - by user248959
    Hi, i have this two lines: var_dump($parametros_post_signin); $this->redirect('prueba/aux?email='.$parametros_post_signin['signin']); the first one prints this: array 'signin' => array 'email_address' => string '' (length=0) 'password' => string '' (length=0) the second one takes to another action where i have this code: var_dump($request->getParameter('email')); that prints this: string 'password' (length=8) I expected it to print something like this: string '' (length=0) What should i do to the get value of the 'email_address' field ? Regards Javi

    Read the article

  • How do I configure custom URL handlers on OS X?

    - by cwd
    I've been reading a lot online about custom URL handlers / custom protocol handlers such as: Launching External Applications using Custom Protocols under OSX OS X URL handler to open links to local files I get that you can tell the system that a particular program is able to handle a certain scheme / protocol with the Info.plist file: <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>Local File</string> <key>CFBundleURLSchemes</key> <array> <string>local</string> </array> </dict> </array> <key>NSUIElement</key> <true/> But if there are multiple applications that are capable of opening the same URL handler, such as mailto: how do you specify which one you want the system to use? There were some references to utilities like the More Internet preference pane which no longer seems to be available from the author's site. I did find it online by Googling but it seems a bit shaky - like it was written for an older OSX - perhaps Tiger. I haven't been able to find information on how to set the URL handler for protocols and custom protocols. I'm assuming there is a plist file somewhere that I can edit - or maybe there is a newer, better utility that works well with Mountain Lion?

    Read the article

  • How do I put a url n a text file and change it to html - making it a shortcut

    - by VISQL
    I've forgotten how to do this. In Windows, you can create a new text document "blah.txt" Inside blah, you can enter a url like http://kongregate.com Then.....??? I forget this step Then you change the file extension of the file to "blah.html" When you double click the file, it acts as a shortcut/hyperlink and takes you to the url you entered in the text file. Can someone tell me what the missing step it? There is something else I need to enter with the url, but I don't know what it is.

    Read the article

  • Convert user title (text) to URL, what instead spaces, #, & and other characters?

    - by Thomas
    I have some form on the website where users can add new pages. I must generate SEO friendly URLs and make this urls unique. What characters can I display in url, I know that spaces I should convert to undescore: " "-"_" and before it - underscores to something else, for example: ""-"()" It is easy make title from url back. But what in my specific title can be all characters from keyboard, even : @#%:"{/\';. Are some contraindications to don't use this characters in URL? Important for me is: -easy generate url and title from url back (without queries to database) -each title are unique, so url must be too -SEO friendly URLs

    Read the article

  • Setting custom HTTP request headers in an URL object doesn't work.

    - by Blagovest Buyukliev
    I am trying to fetch an image from an IP camera using HTTP. The camera requires HTTP basic authentication, so I have to add the corresponding request header: URL url = new URL("http://myipcam/snapshot.jpg"); URLConnection uc = url.openConnection(); uc.setRequestProperty("Authorization", "Basic " + new String(Base64.encode("user:pass".getBytes()))); // outputs "null" System.out.println(uc.getRequestProperty("Authorization")); I am later passing the url object to ImageIO.read(), and, as you can guess, I am getting an HTTP 401 Unauthorized, although user and pass are correct. What am I doing wrong? I've also tried new URL("http://user:pass@myipcam/snapshot.jpg"), but that doesn't work either.

    Read the article

  • play framework WS API always escape character ';' and '=' in URL

    - by user2512057
    When I send a URL like abc.efg.com/query?para1=cat;para2=dog, play WS API always convert it to abc.efg.com/query?para1=cat%03Bpara2%03Ddog. Of course, there are http:// in the beginning in the URL. my code is as below. val url= "http://abc.efg.com/query?para1=cat;para2=dog" val response = WS.url(url).get() When I use fidder or netmon to look at the data that sent to sever, I found play framework WS (2.1.5) always change to the URL above I mentioned. How do I tell WS not to convert?

    Read the article

  • Releasing Shrinkr – An ASP.NET MVC Url Shrinking Service

    - by kazimanzurrashid
    Few months back, I started blogging on developing a Url Shrinking Service in ASP.NET MVC, but could not complete it due to my engagement with my professional projects. Recently, I was able to manage some time for this project to complete the remaining features that we planned for the initial release. So I am announcing the official release, the source code is hosted in codeplex, you can also see it live in action over here. The features that we have implemented so far: Public: OpenID Login. Base 36 and 62 based Url generation. 301 and 302 Redirect. Custom Alias. Maintaining Generated Urls of User. Url Thumbnail. Spam Detection through Google Safe Browsing. Preview Page (with google warning). REST based API for URL shrinking (json/xml/text). Control Panel: Application Health monitoring. Marking Url as Spam/Safe. Block/Unblock User. Allow/Disallow User API Access. Manage Banned Domains Manage Banned Ip Address. Manage Reserved Alias. Manage Bad Words. Twitter Notification when spam submitted. Behind the scene it is developed with: Entity Framework 4 (Code Only) ASP.NET MVC 2 AspNetMvcExtensibility Telerik Extensions for ASP.NET MVC (yes you can you use it freely in your open source projects) DotNetOpenAuth Elmah Moq xUnit.net jQuery We will be also be releasing  a minor update in few weeks which will contain some of the popular twitter client plug-ins and samples how to use the REST API, we will also try to include the nHibernate + Spark version in that release. In the next release, not sure about the timeline, we will include the Geo-Coding and some rich reporting for both the User and the Administrators. Enjoy!!!

    Read the article

  • Visual Studio IntelliSense for URL Rewrite

    Visual Studio doesnt have IntelliSense support for URL Rewrite by default.  This isnt a show stopper since it doesnt result in stop errors. However, its nice to have full IntelliSense support and to get rid of the warnings for URL Rewrite rules. RuslanY has released a Visual Studio schema update for URL Rewrite which is available as a free quick download.  Contrary to the title of the post, the installer is for both URL Rewrite 1.1 and 2.0.  The install takes effect immediately...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SEO made easy with IIS URL Rewrite 2.0 SEO templates

    A few weeks ago my team released the version 2.0 of the URL Rewrite for IIS. URL Rewrite is probably the most powerful Rewrite engine for Web Applications. It gives you many features including Inbound Rewriting (ie. Rewrite the URL, Redirect to another URL, Abort Requests, use of Maps, and more), and in Version 2.0 it also includes Outbound Rewriting so that you can rewrite URLs or any markup as the content is being sent back even if its generated using PHP, ASP.NET or any other technology. It also...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >