Search Results

Search found 18982 results on 760 pages for 'url rewriting'.

Page 15/760 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How can I rewrite / redirect URL's in Glassfish V3?

    - by Jin Liew
    I'd like to simplify the URL's to access a Glassfish V3 application by removing file extensions and otherwise shortening URL's. I've already set my application as the default application, so that there is no need to include the context root in the URL. I'd like to: * Remove file extensions * Shorten the URL to files deep in the folder structure I'd like to do this using pattern matching rather than on a per file basis (Site is small at the moment but will change frequently and grow). Some examples of what I'd like to do: * foo.com/bar.html - foo.com/bar * foo.com/folder1/folder2/bar2.html - foo.com/bar2 Any help would be greatly appreciated. Thanks. Cheers, Jin

    Read the article

  • Nginx Removes the index.php from URL

    - by codeHead
    I have a codeigniter php application on nginx. It works as expected on Apache but after moving to nginx, I noticed that the index.php is automatically removed from the URL in all my links. Infact when I try using index.php it does not go to the desired URL but gets redirected to my default controller. below is a coopy of my nginx.conf file. server{ listen 80; server_name mydomainname.com; root /var/www/domain/current; # index index.php; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log main; location / { # Check if a file or directory index file exists, else route it to index.php. try_files $uri $uri/ /index.php ; } location ~* \.php { fastcgi_pass backend; include fastcgi.conf; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_read_timeout 500; #fastcgi_param SCRIPT_FILENAME $document_root/index.php; add_header Expires "Thu, 01 Jan 1970 00:00:01 GMT"; add_header Cache-Control "no-cache, no-store, private, proxy-revalidate, must-revalidate, post-check=0, pre-check=0"; add_header Pragma no-cache; add_header X-Served-By $hostname; } location ~* ^.+\.(css|js)$ { expires 7d; add_header Pragma public; add_header Cache-Control "public"; } # set expiration of assets to MAX for caching location ~* \.(ico|gif|jpe?g|png)(\?[0-9]+)?$ { expires max; log_not_found on; } } I need to use my URL With the index.php -- please help.

    Read the article

  • Rails AtomFeedBuilder Entry :Url option appears in url tag but not in link tag

    - by Nick
    Hello, I'm using the AtomFeedHelper and everything is working fine except for one feed where I need to link each entry to a URL which is not the default polymorphic_url for the record. Per the documentation I've specified an :url option for the entry. This correctly renders a <url> tag in the atom node but the <link rel="alternate" still points to the default polymorphic_url. Looking at the source and the documentation I don't understand why this is happening. Here's an example builder: atom_feed do |feed| feed.title("Reports") feed.updated(@reports.first.created_at) for report in @reports content = report.notes feed.entry(report) do |entry| entry.title(report.title) entry.content(content, :type => 'html') entry.url("http://myhost/page/") entry.updated(report.updated_at.strftime("%Y-%m-%dT%H:%M:%SZ")) entry.author do |author| author.name(report.user.username) end end end end Here's an example of a problem node: <entry> <id>tag:molly.recargo.com,2005:SiteReport/2</id> <published>2010-03-30T13:11:07-07:00</published> <updated>2010-03-30T13:11:07-07:00</updated> <link rel="alternate" type="text/html" href="http://myhost/site_reports/2"/> <title>Test Title</title> <content type="html">Test Content</content> <url>http://myhost/page/</url> <updated>2010-03-30T13:11:07Z</updated> <author> <name>Author</name> </author> </entry> I wan the href value in the link tag to match the value in the url tag but it does not. When I look at the source listed for entry here http://api.rubyonrails.org/classes/ActionView/Helpers/AtomFeedHelper/AtomFeedBuilder.html I'd assume that this line would work correctly: @xml.link(:rel => 'alternate', :type => 'text/html', :href => options[:url] || @view.polymorphic_url(record)) Confused. Has anyone encountered this before? Thanks all!

    Read the article

  • email address in the url

    - by phoenix24
    Hi, I am passing the email address as part of the url, for ex. http://example.com/hello/[email protected] but, when being passed to the application controller it is changed to " user%40hotmail.com ". I can't seem to understand this special character escaping; confusion. please help me explain the problem here, and also what can I do to fix it. I am using python's "webapp" web application framework.

    Read the article

  • Apache url rewrite problem

    - by Ankit
    requests ----- should be written to new url /institute/dps ----- /institute.php?slug=dps /institute/abc ----- /institute.php?slug=abc /institute/123 ----- /institute.php?slug=123 I am using following rule in .htaccess RewriteRule ^institute/(.*)$ /institute.php?slug=$1 However, it's not working. the page insitute.php get's execution, but the query string always comes empty. Any suggestions?

    Read the article

  • htaccess: Redirect a Dynamic URL - Show only Static URL - Double Content

    - by elmaso
    Hi, I have a rewrite rule to get clean urls.. the only problem is, google shows some dynamic url and i dont want to serve dynamic urls. What I want: if a user types in the dynamic url, he gets redirected to the clean url.. example: http://www.example.com/?index=bananas (if someone types that in, he gets redirect to the url above) http://www.examplcom/bananas/ this is my htacces: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond $1 !apple\+banana RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L] thank you!!

    Read the article

  • How to get a long url from a short url

    - by JK
    I would like to determine what the long url of a short url is. I have tried using http HEAD requests, but very few of the returned header fields actually contain any data pertaining to the destination/long url. Is there: 1. Any way to determine the long url? 2. If so, can it be done without downloading the body of the destination? Thank you

    Read the article

  • htaccess url rewrite,remove querystring and file extension

    - by Miranda
    my current url is something like: http://something.somedomain.com/about_us/profile.php?tab1=about_us a more complicated on is: http://something.somedomain.com/exchange_hosting/feature/outlook_web_access.php?tab1=exchange_hosting&tab2=feature&tab3=outlook_web_access i want to make them shorter: http://something.somedomain.com/about_us/profile http://something.somedomain.com/exchange_hosting/feature/outlook_web_access my .htaccess ################################# # Directory Indexes # ################################# DirectoryIndex index.php ######################################### # REWRITE RULES # ######################################### RewriteEngine On RewriteBase / Options +FollowSymlinks <IfModule mod_rewrite.c> #not a file RewriteCond %{REQUEST_FILENAME} !-f #not a dir RewriteCond %{REQUEST_FILENAME} !-d #this dosen't work #RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /$1.php?tab1=$0&tab2=$1 </IfModule> # END #

    Read the article

  • Apache complex regex crashing with 500 error

    - by digitalspaghetti
    I have been working with an existing website out company has running until I finish developing the new site. I've been asked to add some additional functionality to booking pages that will automatically set a booking button based on passed parameters. The existing working regex is as follows: RewriteRule ^.+-(\d+)\.accommodation$ property_detail.php?id=$1 Which works fine with the url like below and passes through the URL. this-is-the-property-name.1234.accomodation However as a quick shiv, I am trying to do the following: this-is-the-property-name.1234.accomodation?override=true&start_date=2010-05-14&numbernights=2&sleeps=10&price=1012 The regex I came up with for this was: RewriteRule ^.+-(\d+)\.accommodation\?override=(\w+)&start_date=(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])&numbernights=(\d+)&sleeps=(\d+)&price=(\d+)$ property_detail.php?id=$1&override=$2&start_date=$3-$4-$5&numbernights=$6&sleeps=$7&price=$8 The regex is passing as valid in RegexBuddy - however it keeps causing a 500 error on the server. Can anyone help me get my head around this one?

    Read the article

  • Profile:Object reference not set to an instance of an object

    - by sallalman83
    Hi, i just lunch my web site i used the asp.net routing technology on it, and its work fine in my localhost but when i moved the project to the hosting server(Godaddy.com) its just work fine when there is no virtual sub directories like this(havebreak.com) but when u click on this link (havebreak.com/Registration/) or any other links that contain a virtual sub-directories its give Object reference not set to an instance of an object error on the profile object if (!Profile.IsAnonymous) Line 18: mlvRegistratioin.ActiveViewIndex = 1; i check my IIS settings and found it using the "Integrated pipeline" as recommended (at least at my knowledge), i checked the httpModules and httpHandlers tags under the system.webServer (since my hosting plan use the IIS7) and under the normal tag and every thing is fine then i used the url-rewriting instead of URL-Routing and the same problem exist and i notice that the session also not working in the virtual sub-directories too and by the way the ASP.NET routing work fine with my site its just the profile and session objects that not workin any help will be appreciated

    Read the article

  • Reject (Hard 404) ASP.NET MVC-style URLs

    - by James D
    Hi, ASP.NET MVC web app that exposes "friendly" URLs: http://somesite.com/friendlyurl ...which are rewritten (not redirected) to ASP.NET MVC-style URLs under the hood: http://somesite.com/Controller/Action The user never actually sees any ASP.NET MVC style URLS. If he requests one, we hard 404 it. ASP.NET MVC is (in this app) an implementation detail, not a fundamental interface. My question: how do you examine an arbitrary incoming URL and determine whether or not that URL matches a defined ASP.NET MVC path? For extra credit: how do you do it from inside an ASP.NET-style IHttpModule, where you're getting invoked upstream from the ASP.NET MVC runtime? Thanks!

    Read the article

  • Request URL in Javascript, Fetch URL Content using Java Applet, return to Javascript?

    - by Sam G
    I'm in the process of making a little experiment, it grabs a YouTube page, and returns the highest quality MP4 link, then plays this in a HTML 5 Video element. Now I was using PHP with cURL to get the URL content (YouTube), but that only works on my local server (MP4 link is locked to IP address). I can't think of any other way to get the page content due to cross domain rules except a Java applet. So I've built a Java applet that should return the content of a URL. Java import java.applet.Applet; import java.awt.*; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class URLFetcherabc extends Applet { public void init() { } public void paint(Graphics g) { g.drawString("Java loaded. Waiting for URL", 0, 10); } public String getURL(String url, String httpMethod) { try { URL u = new URL(url); HttpURLConnection conn = (HttpURLConnection)u.openConnection(); conn.setRequestMethod(httpMethod); InputStream is = conn.getInputStream(); ByteArrayOutputStream output = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; for (int bytesRead = 0; (bytesRead = is.read(buffer)) != -1; ) { output.write(buffer, 0, bytesRead); } return output.toString(); } catch (Exception e) { }return null; } } Now I've got the applet on the page, but every-time I call the function it returns nothing. Heres my HTML for including the applet. HTML <applet id="URLFetcher" name="URLFetcher" code="URLFetcherabc.class" archive="URLFetcher.jar" height="200" width="200" mayscript=""></applet> Java-Script function fetchurl(urltofetch) { var URLFetcher = document.getElementById("URLFetcher"); var result = URLFetcher.getURL(urltofetch); //Result = URL Content return result; } The function always returns null, in Java the function does work when passed a variable via other means (parameter etc). I've tried running other functions through Javascript and the Java applet does respond. I'm new to Java applets and communicating with them via Javascript, so I'm probably making either a small mistake somewhere or its completely wrong. Any ideas? Thanks

    Read the article

  • Mod_rewrite not working properly

    - by James P
    I have this in my .htaccess file... RewriteEngine on RewriteRule ^/invite$ /invite.html It's meant to let a user access this url: http://mysite.com/invite and display the invite.html page. I don't want to redirect the user, but just show them the invite.html page from a better looking URL. When I browse to http://mysite.com/invite though, I get a 404 not found error. Is there anything I'm doing wrong? I've tried looking at tutorials for using mod_rewrite but I seem to be doing what they're telling me too... Thanks!

    Read the article

  • .htacces to create friendly URLs. Help needed....

    - by Jonathan
    Hi, I'm having a hard time with .htacces. I want to create friendly URLs for a site I'm working on... Basically I want to convert this: http://website.com/index.php?ctrl=pelicula&id=0221889 http://website.com/index.php?ctrl=pelicula&id=0160399&tab=posters Into this: http://website.com/pelicula/0221889/ http://website.com/pelicula/0221889/posters/ In case I need it later I would also want to know how to add the article title to the end of the URL like this (I'm using PHP): http://website.com/pelicula/0221889/the-article-name/ http://website.com/pelicula/0221889/the-article-name/posters/ Note: Stackoverflow method is also good for me, for example the url of this question is: http://stackoverflow.com/questions/3033407/htacces-to-create-friendly-urls-help-needed But you can put anything after the id and it will also work. like this: http://stackoverflow.com/questions/3033407/just-anything-i-want I have used some automatic web tools for creating the .htacces file, but its not working correctly. So I ask for your help. I will also be glad if you can recommend .htacces best practices and recommendations.. Thanks!

    Read the article

  • Searching for URL's Relative to Site Root in Javascript Source

    - by James
    Hi, I am working on a web site with several other developers and we have had problems where people commit JavaScript code with AJAX calls that use URL's relative to the site root. An example would be /Home/Index which will not work if the site is hosted in a virtual directory. To get round the problem we use a $.url() method to convert it to a full path, e.g. $("#container").load($.url("/Home/Index")) I am trying to write a unit test that will search each JavaScript file and find places where the $.url method is not being used. The only problem is that I cannot seem to write a regex expression to do this. I have tried the following: (?!\$\.url\()"(/\w*)+" But this does not work. I cannot find a way to say that I don't want the $.url in front. Does anyone know if this is possible? Note that I need regular expressions that are compatible with .NET Thanks.

    Read the article

  • Reading http file on url

    - by Nkunzis
    I am trying to read an xml file on an http url. "Unexpected end of file from server" keeps on coming . the page is password protected, I would like to know if I am properly giving in my url authentication details. I tried with non protected pages and I can read them properly. Here is my code: URL url = new URL("http://username:[email protected]:0000/test.xml"); URLConnection yc = url.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();

    Read the article

  • Disable .htaccess or disable some rules from .htaccess on specific URL

    - by petRUShka
    I have Kerberos-based authentication and I want to disable it on only root url: mysite.com/. And I want it to works fine on any other page like mysite.com/page1. I have such things in my .htaccess: AuthType Kerberos AuthName "Domain login" KrbAuthRealms DOMAIN.COM KrbMethodK5Passwd on Krb5KeyTab /etc/httpd/httpd.keytab require valid-user I want to turn it off only for root URL. As workaround it is possible to turn off using .htaccess in virtual host config. Unfortunately I don't know how to do it. Part of my vhost.conf: <Directory /home/user/www/current/public/> Options -MultiViews +FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> It would be great if you can advice me something!

    Read the article

  • disable 250 character URL limit in Internet Explorer

    - by Keltari
    Users of a SharePoint Document Library are getting this error: The URL for this file is too long for the application. A temporary copy of this file will be opened on your computer. You must save this copy as a new file. After doing some research, it appears Internet Explorer has a limit of about ~250 characters for a URL. Some URLs provided by SharePoint far exceed this limit. One example being 790 characters long. Is there a way to disable this limit? I have looked, but there doesnt appear to be a solution, other than shortening the folder/path names.

    Read the article

  • How to download a url as a file?

    - by Michelle
    A website url has "hidden" some mp3 files by embedding them as shockwave files, as follows: <span class="caption"><!-- Odeo player --><embed src="http://odeo.com/flash/audio_player_tiny_gray.swf"quality="high" name="audio_player_tiny_gray" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true external_url=http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></span> How can I download the files for off-line listening? I've found two methods: 1. The StackOverflow Method Create a new local html file with just the links eg <a href="http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3">Sunday Edition 25Nov2008</a> Open the file in the browser, right click the link and File Save Link As. 2. The SuperUser Method Install the Firefox addin Iget. (Be sure to use the right version for your Firefox version.) Tools Downloads Enter url in field. Are there any other ways?

    Read the article

  • Apache url rewrite to Nginx

    - by Kaloyan
    i work on a little php platform and my server is nginx. The first version of this php site was developed for Apache server. I need to upgrade the site and to migrate it to nginx server. The problem is url rewriting. I have this simple url rewrite rules in my Apache server: RewriteEngine On RewriteBase /simple-php/ RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteRule ^(.*)$ viewpost.php?id=$1 [QSA,L] I can't "translate" this to nginx rewrite syntax. Can anybody help me? P.S. I can read both documentations, but i have not this time, just need fast solution. Thanks!

    Read the article

  • How to download a URL as a file?

    - by Michelle
    A website URL has "hidden" some MP3 files by embedding them as Shockwave files, as follows. <span class="caption"><!-- Odeo player --><embed src="http://odeo.com/flash/audio_player_tiny_gray.swf"quality="high" name="audio_player_tiny_gray" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true external_url=http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></span> How can I download the files for off-line listening? I've found two methods: 1. The Stack Overflow Method Create a new local HTML file with just the links, for example: <a href="http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3">Sunday Edition 25Nov2008</a> Open the file in the browser, right click the link and File Save Link As. 2. The Super User Method Install the Firefox addin Iget. (Be sure to use the right version for your Firefox version.) Tools Downloads Enter URL in the field. Are there any other ways?

    Read the article

  • How to change the URL on my Amazon EC2 webserver

    - by Sarah
    I am at the point in playing around with EC2 that I have launched a webserver. Right now, the website URL looks like http://ec2-<some numbers>.compute-1.amazonaws.com/ I am evaluating the usefulness of these services for my small business purposes; is there a way I can get my URL to look something more like http://<mybusiness>.com. Ideally, I would like to get it to look cleaner, and furthermore I would rather not have "amazonaws" as part of it. Is this possible? I'm a newb to AWS, so apologies if this is an easy question

    Read the article

  • Project name inserted automatically in url when using django template url tag

    - by thebossman
    I am applying the 'url' template tag to all links in my current Django project. I have my urls named like so... url(r'^login/$', 'login', name='site_login'), This allows me to access /login at my site's root. I have my template tag defined like so... <a href="{% url site_login %}"> It works fine, except that Django automatically resolves that url as /myprojectname/login, not /login. Both urls are accessible. Why? Is there an option to remove the projectname? This occurs for all url tags, not just this one.

    Read the article

  • How should i change the root for mod_rewrite url when i work in localhost

    - by Rajasekar
    I am working on a site maintainence. It uses mod_rewrite technique. But im new to mod_rewrite. How should i change the url to work correctly in my localhost. here's the code: # Enable mod_rewrite, start rewrite engine Options +FollowSymLinks RewriteEngine on rewritecond %{http_host} ^electricians4u.com.au [nc] rewriterule ^(.*)$ http://www.electricians4u.com.au/$1 [r=301,nc] ErrorDocument 404 /error404.php # for searching RewriteRule ^([^/]*)-in-([^/]*)\.htm$ /search.php?searchby=$1&SearchString=$2&search.x=$3&search.y=$4&search=Find+Agent [NC] # for nav RewriteRule ^electricians-in-([^/]*)-([^/]*)$ /search.php?SearchString=$1&state=&page=$2 [NC] # index page RewriteRule ^find-electrician-(.*)$ /find_electrician_in.php?state=$1 [NC,L] # find page RewriteRule ^electrician-(.*)-(.*)$ /find_electrician_in.php?state=$1&bspname=$2 [NC,L] # find page RewriteRule ^electricians-in-([^/]*)\.htm$ /search.php?state=$1&bspname=$2&locality=$3 [NC] Plz help. I know this silly question to ask. But i dont know other alternative.

    Read the article

  • Is trailing slash automagically added on click of home page URL in browser?

    - by Question Overflow
    I am asking this because whenever I mouseover a link to a home page (e.g. http://www.example.com), I notice that a trailing slash is always added (as observed on the status bar of the browser) whether the home page link contains a href attribute that ends with a slash or not. But whenever I am on the home page, the URL on display will not have a trailing slash. I tried entering a slash to the URL in the URL bar. And with Firebug enabled, I notice that the site always return a 200 OK status. An article here discussing this states that having a slash at the end will avoid a 301 redirection. But I am not seeing any redirection, even on this page. Could this be a browser feature that is appending the slash?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >