url

PHP UTF-encoded URL-string

When I type in Firefox (in the address line) URL like http://www.example.com/?query=Траливали, it is automatically encoded to http://www.example.com/?query=%D2%F0%E0%EB%E8%E2%E0%EB%E8. But URL like http://www.example.com/#ajax_call?query=Траливали is not converted. Other browsers such as IE8 do not convert query at all. The question i...

apply mod_rewrite in virtual host

Dear all, i would like to rewrite url in virtual host. Virtual directory : htdoc/dev/ , dev.com syntax in .htaccess in htdoc/dev <IfModule mod_rewrite.c> RewriteEngine On RewriteRule test.html$ test.php [L] </IfModule> I am able to rewrite test.html to test.php in localhost. However, not able to do it in virtual host. What went wron...

PHP REGEX: Get Image from URL

What I want If the URL in the string contains a .jpg at the end of the URL (not the string) then it should make an image from it with preg_replace else make a normal link. so for example: If I have http://www.example.com/images/photo.jpg then it should replace with: <img src="http://www.example.com/images/photo.jpg" alt="http://ww...

What is a clean way to use a "/" in a part of a URL.

In an MVC framework, I have a model with an "identifier" field. This field can be whatever is used by the user as their unique identifier. I then use this identifier field in URLs to access the relevant resources. /people/<identifier>/ In one such case, the user is using identifiers of the format 00/000. The quick among you will have ...

Get Request URL From Web Service

I have a web service, and this service has many function. My Other web applications use these functions. Can I get request URL or IP address in Web Service function. I want to get My Web Application's URL for security. How can I do? ...

url rewriting problem

in my .htaccess file i have the following Options -Indexes RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)/(.*)$ index.php?lang=$1&id=$2 [L] so when i wrote http://mydomain.com/am/home it will be redirected to http://mydomain.com?lang=am&amp;id=home but i have a cms folder, and i need to go to http://my...

set default on webpage

Dear all, I have an issue with url direction here. I have used mod_rewrite in apache to rewrite the url from domain.com/page.php to domain.com/path/page.php. I have some link in the webpage for example href="newpage.php" will automatically go to domain.com/path/newpage.php instead of domain.com/newpage.php. May I know is there any php ...

Asian URLs or English slugs in webpages

Here's a tough one: I'm working on a website where most of the content is in Japanese. But consider this url: http://www.stackoverflow.com/質問/日本語のURLはどうする Most URL parsers, including stackoverflow's, don't know where to delimit URLs that contain Japanese. Not good. I haven't checked with other browsers yet, but Google Chrome will di...

Android Drawable Images from URL

I am presently using the following peice of code to load in images as drawable objects form a URL. Drawable drawable_from_url(String url, String src_name) throws java.net.MalformedURLException, java.io.IOException { return Drawable.createFromStream(((java.io.InputStream)new java.net.URL(url).getContent()), src_name); } Th...

Should I worry about RSS urls for SEO?

Very quick question: should I worry about RSS urls for search engine optimization? Can I just use an obscure ID number, or should it be as clean as an HTML document link? ...

PHP: Codeigniter style-url:s?

Hi everybody, I am looking for some help on how to create the sort of URL-rewriting CodeIgniter features for my own PHP pet application. I know that the .htaccess-file does one part of the magic, but how does a PHP file looks that handles the URL splitting and calling of controllers/methods accordingly to the URI? Thanks a lot for yo...

i am having link to my terms and conditions data ,i want to show this data by reading it

how to read data from an url link,and want to display it on my text view...... url link content contains only normal text i am using NSString *userAgreementStringURL = [NSString stringWithFormat:@"%@/requestConfigurationData.php?ownerID=%@&view=userAgreement", serverURL, ownerID]; NSURL *userAgreementURL = [NSURL URLWithString:us...

writeToURL not working

Hello, I am trying to use NSString *myString = @"NO"; [myString writeToURL:[NSURL URLWithString:@"http://example.com/text.txt"] atomically:YES]; But am having no luck. myString is set to NO and example.com is set to the correct website. The only issue I could see would be text.txt already existing? Can writeToURL even write to http?...

# character in URL and Scroll to top of the screen on page load

When I refresh a page, browsers retain the scroll position of the page if there is a # in the URL, How to over ride this behavior and scroll to the top of the screen without using JavaScript. My URL is like http://example.com/# Update By default the URL is http://example.com/ and the # character is added to the URL upon clicking some p...

pass url stored as string in variable to form's onsubmit

how can i make a form tag using onsubmit (that executes upon hitting enter) which opens a target window with a given url in a string variable form? what i have so far: <div id="row2"> <!-- Intranet Search --> <form action="" onSubmit="urlGen(this);" method="get" target="_blank"> <input type="text" id="intranet" size="15" value="Sea...

Adding encoded chars to the url breaks htaccess

Hello Here's my code: RewriteEngine on RewriteRule page/(.*) index.php?url=$1 [NC] When I access page/http://google.com/ = works just fine When I access page/http%3A%2F%2Fgoogle.com%2F = server reports 404 Martti Laine ...

Check current URL

We have urls: http://site.com/movies/posters/ID.html http://site.com/movies/posters/fixed/ID.html How do I know if /posters/fixed/ is present in the current url (on opened page)? Like: if ("/posters/fixed/" present) { $match_fixed = true; } Thanks. ...

Getting Query Parameter from a URL which inturn has some URL with Query parameters

Hello all I've the following URL http://somesite/somepage.aspx I pass a query parameter value which has another URL with query parameters like this. http://somesite/somepage.aspx?pageURL=http://someothersite/someotherpage.aspx?param1=value&amp;source=http://anotheronesite/anotherpage I need to get the pageURL value as the one in th...

How would I find all the short urls that link to a particular long url?

Basically I want to know how many people have tweeted a link to a url, but since there are dozens of link shortener out there I don't see any way to do this without having access to all of their url maps. I found a previous question here but it was over a year old and didn't have any new answers. So #1, does anyone know of a service/AP...

Attaching Files to Email in App Engine?

How do I attach a file located on Web URL to an email using google app engine (Python)? I have the file located at say: http://www.abc.com/files/file.pdf I want to attach this to an email and send it to a user on app engine. How do I do this? ...