Search Results

Search found 28879 results on 1156 pages for 'pretty url'.

Page 123/1156 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • Problem with \' in URLencoding

    - by Bruce
    I am working on Java. Here is my code response = URLEncoder.encode(response, "UTF-8").replaceAll("\\+", "%20"); Problem comes when there is a ' (single quote) in the string response. It gets encoded to \'. eg - 'Collective Dynamics of Complex Networks' comes as \'Collective Dynamics of Complex Networks\' I want it to remain as it is. What should I do?

    Read the article

  • mod_rewrite different rules for different pages

    - by Sophia Gavish
    Hi, I'm trying to understand how mod_rewrite works. I've been using it before but this week I tried to write rules to a new website and it doesn't works. I want to make a rule to make : www.example.com/media/?gallery=galleryname&album=albumname&pid=pictureid looks like: www.example.com/media/galleryname/albumname/pictureid The rule is: RewriteRule ^([^/])/([^/])/([^/]*)$ /media/?gallery=$1&album=$2&pid=$3 [L] and here is the code below: Options -Indexes Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_METHOD} !^(TRACE|TRACK|GET|POST|HEAD)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^([^/])/([^/])/([^/]*)$ /media/?gallery=$1&album=$2&pid=$3 [L] I really want to know what I'm missing, because I tried some examples and it looks fine to me. maybe because /media/ is an actual folder the rule is wrong? Thanks.

    Read the article

  • REGEX HELP: SUBDOMAIN CHECK

    - by NoviceCoding
    Hey I have a form where the person enters the subdomain like value.google.com and the entry would be "valid" I want to run a regex check (I am absolutely horrible at regex) that does the following: First Character: Cannot be symbol Middle Characters: a-z, A-Z, and symbols - and . ONLY Last character: Cannot be a symbol I want it to spit out false if it fails the test. Can anyone help me out with this? Thanks! Also any other limitations do you guys think should be in there?

    Read the article

  • Codeigniter URI Routing

    - by justin
    I have check the codeigniter user guide, But I was not lucky to solve my problem. I have created a webpage on my localhost. When I go to http://localhost/webpage/ it is okay. It will go to the default controller. My default controller is Homepage and there are methods named index, guarantee and about When I go to my routes.php, I added this: $route['guarantee'] = "homepage/guarantee"; $route['about_us'] = "homepage/about"; Then try to access it http://localhost/webpage/guarantee and http://localhost/webpage/about_us it show ERROR 404 But when I do it like this $route['default_controller'] = "homepage/guarantee"; The guarantee page will be displayed. Can anyone help me with this issue? Thanks.

    Read the article

  • Point subdirectory to another domain is IIS 6

    - by Liviu
    Is it possible to rewrite somehow www.mysite.com/Pictures to point to test.mysite.com/Pictures or even more broadly www.someothersite.com/Pictures ? Note: www.mysite.com and test.mysite.com are on separate machines and built with different technologies (one is ASP.NET and the other is PHP) but I have access to both of them. I want that when I reference a picture like www.mysite.com/Pictures/pic12345.png the picture to display correctly, even though there is not /Pictures folder on that server and the pictures has to be retrieved by going to test.mysite.com/Picture/pic12345.png Ideally I want to do this in IIS6 to test it. However I am interested if it possible to do in any webserver (Apache, IIS7)

    Read the article

  • Uppercase and lowercase urls in PHP

    - by Arjun
    I have created folders in my root example: http://www.zipholidays.co.uk/Cuba or http://www.zipholidays.co.uk/Florida When I type http://www.zipholidays.co.uk/cuba (Cube in lowercase), it shows page not found. I'm using Apache server. People are linking to pages with lowercase, uppercase, mixed case - whatever. What do I do to make the pages case insensitive?

    Read the article

  • .htaccess mod force extra characters

    - by user1090809
    I need to be able to write/post links on the web that look like 'mysite.com/?d=foo', and take the user to filepath '/foo.php'. Here is my htaccess: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([^/]+)/$ $1.php [L] RewriteRule ^([^/]+(/[^/]+)*)/$ /$1.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule ^([^.]+[^/.])$ /$1/ [R=301,L,NC] Baically I need to "force" '/?d=' before the filename, kinda like I've already modded my htaccess to force a trailing slash. How do I need to reconstruct my htaccess to make that possible?

    Read the article

  • SOLVED BleachBit: How to Completely Clear URL History in Firefox?

    - by tSquirrel
    14.04 / Firefox 29.0 I've been using Bleachbit to clear usage/file history, and for the most part it works great. However, it doesn't seem to clear the website hostnames out of the URL, at all. These addresses are not bookmarked. Also, the total URL isn't preserved, just the hostname. Visit site http://www.bluesnews.com/some_random_URL_string Exit Firefox Run Bleachbit, with ALL Firefox options selected Restart Firefox Check history: completely empty, other than bookmarked sites. www.bluesnews is NOT bookmarked Type "blue" which is Firefox automatically completes as "http://www.bluesnews.com/" Alternate Step #3: Use Firefox's built-in "Clear History" and select ALL entries with a time frame of "Everything". Same result as above. My inquiry in BB forums hasn't been responded to. I found Dan's proposed solution, however changing autocomplete in about:config only turns off the function, it doesn't actually stop storing URLs. SOLVED - See my comment in the "Answer" response from Tim

    Read the article

  • Include ":" character in parameter using Apache's mod_rewrite

    - by travis
    I use something like that to pass to the parameter 'text' what follows after the domain RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?text=$1 [L,QSA] So if I have www.example.com/tralala I get $text='tralala' But I want it to be possible to have in the parameter the character ":" multiple times: www.example.com/me:you:him Can you give me a hand? If I test www.example.com/me:you:him I get the error: Forbidden You don't have permission to access /you:me:him on this server.

    Read the article

  • Rewrite document.location without loading

    - by Miro
    I am developing a system which is 100% ajax, except of course, the first request. I am interested in changing the address in document.location, using javascript. But I don't want the browser to load the page on that "new" location. Does anyone know how I can do this? miro

    Read the article

  • How do I modify this download function in Python?

    - by TIMEX
    Right now, it's iffy. Gzip, images, sometimes it doesn't work. How do I modify this download function so that it can work with anything? (Regardless of gzip or any header?) How do I automatically "Detect" if it's gzip? I don't want to always pass True/False, like I do right now. def download(source_url, g = False, correct_url = True): try: socket.setdefaulttimeout(10) agents = ['Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)','Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)','Microsoft Internet Explorer/4.0b1 (Windows 95)','Opera/8.00 (Windows NT 5.1; U; en)'] ree = urllib2.Request(source_url) ree.add_header('User-Agent',random.choice(agents)) ree.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() h = opener.open(ree).read() if g: compressedstream = StringIO(h) gzipper = gzip.GzipFile(fileobj=compressedstream) data = gzipper.read() return data else: return h except Exception, e: return ""

    Read the article

  • Finding part of a string that a user has sent via POST

    - by blerh
    My users can send links from popular file hosts like Rapidshare, Megaupload, Hotfile and FileFactory. I need to somehow find out what filehost they sent the link from and use the correct class for it appropriately. For example, if I sent a Rapidshare link in a form on my web page, I need to somehow cycle through each file host that I allow until I find the text rapidshare.com, then I know the user has posted a Rapidshare link. Perhaps a PHP example: switch($_POST['link']) { case strstr($_POST['link'], 'rapidshare.com'): // the link is a Rapidshare one break; case strstr($_POST['link'], 'megaupload.com'): // the link is a Megaupload one break; case strstr($_POST['link'], 'hotfile.com'): // the link is a Hotfile one break; case strstr($_POST['link'], 'filefactory.com'): // the link is a Filefactory one break; } However, I know for a fact this isn't correct and I'd rather not use a huge IF statement if I can help it. Does anyone have any solution to this problem? If you need me to explain more I can try, English isn't my native language so it's kinda hard. Thanks all.

    Read the article

  • How to rewrite to a virtual directory with a different application

    - by Eytan Levit
    Hi, I have a CMS application that manages multiple websites, today whenever i change the codebehind of one of these websites - i have to rebuild the dll for all websites, deploy it - this disconnects all current sessions and is really bad. The iis is configured to listen to all domain requests, if the request is to one of the websites' domain , the application rewrites it, or example, if someone requests for http://www.example.com, and example.com is configured in the application to be website 12, it is rewritten to http://www.example.com/websites/12/default.aspx. This is done for all websites. We want to seperate the dlls of the websites from each other, and from the main CMS, we have a virtual directory to each websites, but when trying to rewrite to it, we discover that IIS support this (we get an "Could not load type '_12._Default'". error). How can we perform this rewrite so it does rewrite to virtual directories, or if anyone has any other solution for the initial dll seperation problem. Thanks in advance

    Read the article

  • Rewriting URLs and "faking" folders

    - by ct2k7
    Hi, I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The folders don't exist, but "virtually" exist for the rewriting purpose. What rule do I used in this?

    Read the article

  • Rewriterule end slash

    - by Maxime
    Hi, I'm working on a Rewriterule in order to have URLs like these: http://www.myhost.com/var1/var2/ RewriteRule ^(.*)\/(.*)\/$ index.php?var1=$1&var2=$2 [L] What I would like to add is that when someone types myhost.com/var1/var2 (without the end slash), it still goes to the same page. Is there a better way to do it than this? RewriteRule ^(.*)\/(.*)\/$ index.php?band=$1&song=$2 [L] RewriteRule ^(.*)\/(.*)$ index.php?band=$1&song=$2 [L]

    Read the article

  • Is it hacky to manually construct JSON and manually handle GET, POST instead of using a proper RESTful API for AJAX functionality?

    - by kliao
    I started building a Django app, but this probably applies to other frameworks as well. In Backbone.js methods that call the server (fetch(), create(), destroy(), etc.), should you be using a proper RESTful API such as one provided by Tastypie or Django-Piston? I've founded it easier and more flexible to just construct the JSON in my Django Views, which are mapped to some URLs that Backbone.js can use. Then again, I'm probably not leveraging Tastypie/Django-Piston functionality to the fullest. I'm not ready to make a full-fledged RESTful API for my app yet. I simply would like to use some of the AJAXy functionality that Backbone.js supports. Pros/Cons of doing this?

    Read the article

  • Web development - relative URLs without duplicating files

    - by eshriek
    I have a site with index.php in the root folder, images in /img , and overview.php in /content . I have a sidebar.php file that is included in both index.php and overview.php . How should I refer to /img/image.gif if I include a link in each file? The location of image.gif changes relative to the location of the file that references it. Using /img/image.gif in sidebar.php will work in index.php, but it fails for the file located at /content/overview.php. The only solution that I can see is to either include a seperate sidebar.php in each subdirectory, or include an /img directory in every sub-directory. The best suggestion that I can find is to use the <base html tag as suggested here: Change relative link paths for included content in PHP However, in the same link, SamGoody suggests that the <base tag "is no longer properly supported in Internet Explorer, since version 7." I'd like some insight on the matter before committing to a course of action. Thanks. EDIT: I am using the wrong approach below with "../" Example- root/index.php: ... <link rel="stylesheet" type="text/css" href="style.css" /> <title>title</title> </head> <body> <?php include('include/header.php'); ?> <?php include('include/menu.php'); ?> ... root/include/header.php: ... <div id="header"> <span class="fl"><img src="img/dun1.png"/></span><span class="fr"><img src="img/dun2.png"/></span> ... root/content/overview.php: ... <link rel="stylesheet" type="text/css" href="../style.css" media="screen" /> <title>Overview</title> </head> <body> <?php include('../include/header.php'); ?> <?php include('../include/menu.php'); ?> ...

    Read the article

  • Flex: How can I use the @ContextRoot in a Button or LinkButton

    - by Dave Meurer
    I'm trying to create a button that will simply link back to the context root. I noticed flex has a @ContextRoot attribute that appears to work only in certain cases. For example, if I try to use it in the following mxml: <mx:Button label="Back to Root" click="navigateToURL(new URLRequest(@ContextRoot()), '_parent')"/> I get the following error: Error: Attributes are not callable. I can't seem to find this technique explained anywhere, is there another way? Thanks for the help! Dave

    Read the article

  • How do I manipulate the Url of my Silverlight testpage.aspx?

    - by Daniel
    I am making an XNA game using Silverlight over the web. My testpage.aspx is linked to from a previous page where the client selects certain elements. The testpage.aspx URL changes depending on what I have sent to it. Now in my mainpage.cs file I would like to call certain functions depending on what was passed, but I am unsure how to manipulate or even access the URL. Is there a specific class in the Silverlight library I can use? Thank you for your time.

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >