Search Results

Search found 438 results on 18 pages for 'slash'.

Page 4/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • nginx trailing slash issues

    - by ry
    I'm googling a lot and found several workarounds, but you have to deinfe every single directory. On Apache: example.com/hi - example.com/hi/ On nginx: example.com/hi - Firefox can't establish a connection to the server at example.com:8888 where 8888 is what Apache is listening on (nginx's :80 - localhost:8888) Any ideas how to fix this and have it just forward normally like folder?

    Read the article

  • Forward slash problem in xsl and xsql

    - by Peter Kaleta
    Hi I have simple xsql <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="zad1.xsl" ?> <page xmlns:xsql="urn:oracle-xsql" connection="java:comp/env/jdbc/mondialDS"> <xsql:query max-rows="-1" null-indicator="no" tag-case="lower" rowset-element="continents"> select name as continent from mondial_user.Continent order by 1 </xsql:query> </page> which gives me a list of continents with "australia/oceania" among them i use XSL on above xsql : <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Root template --> <res> <xsl:template match="/continents"> <xsl:for-each select="row"> <re> <xsl:value-of select="continent"/> </re> </xsl:for-each> </xsl:template> </res> </xsl:stylesheet> Firefox throws an error on "wrong formated xml document" with: AfricaAmericaAsiaAustralia/OceaniaEurope -----------------------------------^ Help appreciated.

    Read the article

  • htaccess - Redirects with more than 1 slash not working

    - by barfoon
    Hey everyone, Just moved to shared hosting on GoDaddy and Im trying to get my .htaccess rules working. Heres what I have: ErrorDocument 404 /error.php Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.mydomain\.org$ RewriteRule ^(.*)$ http://mydomain.org/$1 [R=301,L] RewriteRule ^view/(\w+)$ viewitem.php?itemid=$1 [R=301,L] RewriteRule ^category/(\w+)$ viewcategory.php?tag=$1 [R=301,L] RewriteRule ^faq$ faq.php RewriteRule ^about$ about.php RewriteRule ^contact$ contact.php RewriteRule ^submit$ submit.php RewriteRule ^contactmsg$ handler-contact.php All the pages @ the root of the domain seem to be working i.e mydomain.org/faq, mydomain.org/about are working. But whenever I try mydomain.org/category/somecategory, I get a 404. How can I fix my .htaccess to obey these rules that are more than 1 level deep? Thanks,

    Read the article

  • Mod_rewrite and redirects with training forward slash not working

    - by john williams
    I'm using the following lines of code in my .htaccess file to create redirects. The problem is, whenever I go to example.com/register/ it cant find the css files because it's looking for example.com/register/mycss.css instead of example.com/mycss.css. Redirect 301 register.php http://example.com/register RewriteRule ^register/?$ register.php How can I correct this? I'm new to any kind of htaccess/mod_rewrite functions so feel free to point me in the right direction if there are any other flaws.

    Read the article

  • how to prevent database to add slash to quotes

    - by black sensei
    i know this sounds really common and so trivial but , am having a challenge here. I have a web site with Zend/Doctrine and i use ckeditor for the backend management. after uploading the site i've realized that during edit testing the look and feel of the site is messed up. with the help of firebug, i've seen that there are slashes all over the html. after inline edition, the look and feel came back to normal. There are so many files , i can't think of doing other decoding before outputting data from mysql. What options do i have to solve this problem. the site is up already and i feel a bit unconfortable about this. Can anyone give a hint? thanks

    Read the article

  • "slash before every quote" problem

    - by Camran
    I have a php page which contains a form. Sometimes this page is submitted to itself (like when pics are uploaded). I wouldn't want users to have to fill in every field again and again, so I use this as a value of a text-input inside the form: value="<?php echo htmlentities(@$_POST['annonsera_headline'],ENT_COMPAT,'UTF-8');?>"> This works, except it adds a "\" sign before every double-quote... For instance writing 19" wheels gives after page is submitted to itself: 19\" wheels And if I don't even use htmlentities then everything after the quotes dissappears. What is the problem here?

    Read the article

  • URL structure preference - to slash or not to slash?

    - by TheDeadMedic
    I'm using custom post types in WordPress 3.0 to manage 'courses' (or seminars, lectures, whatever term you'd prefer to have in mind). Now for viewing a single 'course', the url structure is; /course/course-name/ But for multiple courses? /courses/category/category-name/ Or... /course-category/category-name/ Or something entirely different?

    Read the article

  • removing forward slash in .htaccess

    - by user1083644
    I am using Jobbersbase for my online job portal. In which i have given link to my main webpage page like this http://www.mydomain.com/aboutus.html, but its not working because the link is taking '/' at the end http://www.mydomain.com/aboutus.html/ I tried adding RewriteCond %{REQUEST_FILENAME}\.html -f in .htaccess , if i add that other links doesnt work which has / for example http://www.mydomain.com/jobs/ Now my .htaccess looks like this # AddType x-mapp-php5 .php # AddHandler x-mapp-php5 .php RewriteEngine On RewriteCond %{REQUEST_URI} .*/$ RewriteRule (.*)/$ $1 ErrorDocument 404 /page-unavailable/ <files ~ "\.tpl$"> order deny,allow allow from none deny from all </files> Someone please suggest me how to do it thanks

    Read the article

  • remove multiple training slashes mod_rewrite

    - by Boyan
    I know this question was asked a number of times on this site alone, but browsing through the relevant posts I couldn't find a solution. Trying to remove multiple trailing slashes after domain. The following mod_rewrite expressions seem to work for URLs such as http://www.domain.com//path1///path2////, but do not work for domain// DirectorySlash Off RewriteEngine on # Canonical fix RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301] RewriteRule ^/main.do http://www.domain.com/ [R=301,L] RewriteRule ^/index.jsp http://www.domain.com/ [R=301,L] # Remove bogus query strings RewriteCond %{query_string} q= [NC] RewriteRule (.*) http://www.domain.com/$1? [R=301,L] # Remove multiple slashes after domain - DOESN'T WORK!!! #RewriteCond %{REQUEST_URI} ^//+(.*)$ [OR] #RewriteCond %{REQUEST_URI} ^(.*/)/+$ #RewriteRule / http://www.domain.com/%1 [R=301,L] # Remove multiple slashes anywhere in URL RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] # Externally redirect to get rid of trailing slash except for home page, ads RewriteCond %{REQUEST_URI} !^/ads/ RewriteRule ^(.+)/$ $1 [R=301,L] Your help is appreciated.

    Read the article

  • remove multiple trailing slashes mod_rewrite

    - by Boyan
    I know this question was asked a number of times on this site alone, but browsing through the relevant posts I couldn't find a solution. Trying to remove multiple trailing slashes after domain. The following mod_rewrite expressions seem to work for URLs such as http://www.domain.com//path1///path2////, but do not work for domain// DirectorySlash Off RewriteEngine on # Canonical fix RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301] RewriteRule ^/main.do http://www.domain.com/ [R=301,L] RewriteRule ^/index.jsp http://www.domain.com/ [R=301,L] # Remove bogus query strings RewriteCond %{query_string} q= [NC] RewriteRule (.*) http://www.domain.com/$1? [R=301,L] # Remove multiple slashes after domain - DOESN'T WORK!!! #RewriteCond %{REQUEST_URI} ^//+(.*)$ [OR] #RewriteCond %{REQUEST_URI} ^(.*/)/+$ #RewriteRule / http://www.domain.com/%1 [R=301,L] # Remove multiple slashes anywhere in URL RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] # Externally redirect to get rid of trailing slash except for home page, ads RewriteCond %{REQUEST_URI} !^/ads/ RewriteRule ^(.+)/$ $1 [R=301,L] Your help is appreciated.

    Read the article

  • How to Remove Extensions From, and Force the Trailing Slash at the End of URLs?

    - by Kronbernkzion
    Example of current file structure: example.com/foo.php example.com/bar.html example.com/directory/ example.com/directory/foo.php example.com/directory/bar.html example.com/cgi-bin/directory/foo.cgi I would like to remove HTML, PHP and CGI extensions from, and then force the trailing slash at the end of URLs. So, it could look like this: example.com/foo/ example.com/bar/ example.com/directory/ example.com/directory/foo/ example.com/directory/bar/ example.com/cgi-bin/directory/foo/ I am very frustrated because I've searched for 17 hours straight for solution and visited more than a few hundred pages on various blogs and forums. I'm not joking. So I think I've done my research. Here is the code that sits in my .htaccess file right now: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(([^/]+/)*[^./]+)/$ $1.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]|/)$ RewriteRule (.*)$ /$1/ [R=301,L] As you can see, this code only removes .html (and I'm not very happy with it because I think it could be done a lot simpler). I can remove the extension from PHP files when I rename them to .html through .htaccess, but that's not what I want. I want to remove it straight. This is the first thing I don't know how to do. The second thing is actually very annoying. My .htaccess file with code above, adds .html/ to every string entered after example.com/directory/foo/. So if I enter example.com/directory/foo/bar (obviously /bar doesn't exist since foo is a file), instead of just displaying message that page is not found, it converts it to example.com/directory/foo/bar.html/, then searches for a file for a few seconds and then displays the not found message. This, of course, is bad behavior. So, once again, I need the code in .htaccess to do the following things: Remove .html extension Remove .php extension Remove .cgi extension Force the trailing slash at the end of URLs Requests should behave correctly (no adding trailing slashes or extensions to strings if file or directory doesn't exist on server) Code should be as simple as possible I would very much appreciate any help. And to first person that gives me the solution, I'll send two $50 iTunes Store gift cards for US store. If this offends anyone, I am truly sorry and I apologize. Thanks in advance.

    Read the article

  • How to prevent Google Analytics from adding a second slash between domain and page specific URL when viewing a page?

    - by Jeromy Anglim
    I have a blog http://foo.tumblr.com. I sometimes go to Site Content - All Pages on Google Analytics and then navigate to page listing and then click the icon to take me to that page on my blog. However, instead of opening http://foo.tumblr.com/post/1234/blah.html Google Analytics is opening http://foo.tumblr.com//post/1234/blah.html (i.e., it is adding a second slash between the domain the page specific component of the URL). How can I stop Google Analytics from doing this?

    Read the article

  • Correctly encode characters in a PHP mail form ("I'm" turns to be "I\'m")

    - by Peanuts
    Hello guys, I'm testing a PHP mail form, a very barebones one, found here: <?php if(isset($_POST['submit'])) { //The form has been submitted, prep a nice thank you message $output = '<h3>Thanks for your message</h3>'; //Deal with the email $to = '[email protected]'; $subject = 'you have a mail'; $contactname = strip_tags($_POST['contactname']); $adress = strip_tags($_POST['adress']); $contactemail = strip_tags($_POST['contactemail']); $textmessage = strip_tags($_POST['textmessage']); $boundary =md5(date('r', time())); $headers = "From: My Site\r\nReply-To: [email protected]"; $message = "Name: ".$contactname."\n"; $message .= "Adress: ".$adress."\n"; $message .= "E-mail: ".$contactemail."\n"; $message .= "Message: ".$textmessage."\n"; mail($to, $subject, $message, $headers); } ?> The problem is I'm receiving an unwanted slash "\" everytime I write a single or a double quote in my message, so "I'm" appear as "I\'m" in my mailbox. I know it have to do with the way PHP distinguishes code quotes from only lecture quotes, but I wouldn't know what to add in my form to get it properly running. Any help is appreciated,

    Read the article

  • Encrypt correctly caracters in a PHP mail form ("I'm" turns to be "I\'m")

    - by Peanuts
    Hello guys, I'm testing a PHP mail form, a very barebones one, found here: <?php if(isset($_POST['submit'])) { //The form has been submitted, prep a nice thank you message $output = '<h3>Thanks for your message</h3>'; //Deal with the email $to = '[email protected]'; $subject = 'you have a mail'; $contactname = strip_tags($_POST['contactname']); $adress = strip_tags($_POST['adress']); $contactemail = strip_tags($_POST['contactemail']); $textmessage = strip_tags($_POST['textmessage']); $boundary =md5(date('r', time())); $headers = "From: My Site\r\nReply-To: [email protected]"; $message = "Name: ".$contactname."\n"; $message .= "Adress: ".$adress."\n"; $message .= "E-mail: ".$contactemail."\n"; $message .= "Message: ".$textmessage."\n"; mail($to, $subject, $message, $headers); } ?> The problem is I'm receiving an unwanted slash "\" everytime I write a single or a double quote in my message, so "I'm" appear as "I\'m" in my mailbox. I know it have to do with the way PHP distinguishes code quotes from only lecture quotes, but I wouldn't know what to add in my form to get it properly running. Any help is appreciated,

    Read the article

  • Why does Java automatically decode %2F in URI encoded filenames?

    - by Lucas
    I have a java servlet that needs to write out files that have a user-configurable name. I am trying to use URI encoding to properly escape special characters, but the JRE appears to automatically convert encoded forward slashes (%2F) into path separators. Example: File dir = new File("C:\Documents and Setting\username\temp"); String fn = "Top 1/2.pdf"; URI uri = new URI( dir.toURI().toASCIIString() + URLEncoder.encoder( fn, "UTF-8" ).toString() ); File out = new File( uri ); System.out.println( dir.toURI().toASCIIString() ); System.out.println( URLEncoder.encoder( fn, "UTF-8" ).toString() ); System.out.println( uri.toASCIIString() ); System.out.println( output.toURI().toASCIIString() ); The output is: file:/C:/Documents%20and%20Settings/username/temp/ Top+1%2F2.pdf file:/C:/Documents%20and%20Settings/username/temp/Top+1%2F2.pdf file:/C:/Documents%20and%20Settings/username/temp/Top+1/2.pdf After the new File object is instantiated, the %2F sequence is automatically converted to a forward slash and I end up with an incorrect path. Does anybody know the proper way to approach this issue? The core of the problem seems to be that uri.equals( new File(uri).toURI() ) == FALSE when there is a '%2F' in the URI. I'm planning to just use the URLEncoded string verbatim rather than trying to use the File(uri) constructor.

    Read the article

  • What are the common character animation techniques used in tile based hack&slash games?

    - by Gorky
    I wonder what kind of animation techniques are used for creature and character animation in modern hack&slash type tile based games? Keyframing for different actions may be one option. Skeletal framing may be another. But how about the physics? Or do they use a totally hybrid system of inverse kinematics supported with a skeleton,physics and mixed with interpolated keyframing for more realistic animations? If so, how and for what reasons? I can think of many different solutions for the issues below but I wonder what's used and best suited for issues like: Walking or moving on an uneven terrain Combat interaction, combat physics and collisions Attaching rigid items to character and their iteractions ih physics world Soft body dynamics like hair, vegetation, clothes and fabric in line with animations and iteractions.

    Read the article

  • Check if a String is a double or an int?

    - by user69514
    I have a string for a Date in the form mm/dd, and I need to check if either the month or day was entered as a double public Date(String dateStr){ int slash = 0; //check slash is present try{ slash = dateStr.indexOf('/'); }catch(StringIndexOutOfBoundsException e){ error = "Invalid date format: " + dateStr; } //check if month is a number try{ month = Integer.parseInt(dateStr.substring(0, slash)); //day = Integer.parseInt(dateStr.substring(slash + 1, dateStr.length())); } catch(NumberFormatException e){ System.out.println("Invalid format for input string: " + dateStr.substring(0, slash)); } //check if day is a number try{ day = Integer.parseInt(dateStr.substring(slash + 1, dateStr.length())); } catch(NumberFormatException e){ System.out.println("Invalid format for input string: " + dateStr.substring(slash + 1, dateStr.length())); } //check if month was entered as a double }

    Read the article

  • How to Remove Extensions From, and Force the Trailing Slash at the End of URLs?

    - by Kronbernkzion
    Example of current file structure: example.com/foo.php example.com/bar.html example.com/directory/ example.com/directory/foo.php example.com/directory/bar.html example.com/cgi-bin/directory/foo.cgi I want to remove HTML, PHP and CGI extensions from, and then force the trailing slash at the end of URLs. So, it could look like this: example.com/foo/ example.com/bar/ example.com/directory/ example.com/directory/foo/ example.com/directory/bar/ example.com/cgi-bin/directory/foo/ I've searched for solution for 17 hours straight and visited more than a few hundred pages on various blogs and forums. I'm not joking. So I think I've done my research. Here is the code that sits in my .htaccess file right now: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(([^/]+/)*[^./]+)/$ $1.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]|/)$ RewriteRule (.*)$ /$1/ [R=301,L] As you can see, this code only removes .html (and I'm not very happy with it because I think it could be done a lot simpler). I can remove the extension from PHP files when I rename them to .html through .htaccess, but that's not what I want. I want to remove it straight. This is the first thing I don't know how to do. The second thing is actually very annoying. My .htaccess file with code above, adds .html/ to every string entered after example.com/directory/foo/. So if I enter example.com/directory/foo/bar (obviously /bar doesn't exist since foo is a file), instead of just displaying message that page is not found, it converts it to example.com/directory/foo/bar.html/, then searches for a file for a few seconds and then displays the not found message. This, of course, is bad behavior. So, once again, I need the code in .htaccess to do the following things: Remove .html extension Remove .php extension Remove .cgi extension Force the trailing slash at the end of URLs Requests should behave correctly (no adding trailing slashes or extensions to strings if file or directory doesn't exist on server) Code should be as simple as possible I would very much appreciate any help. And to first person that gives me the solution, I'll send two $50 iTunes Store gift cards for US store. If this offend anyone, I am truly sorry and I apologize. Thanks in advance. And sorry for such a long post.

    Read the article

  • How does one use the built in IIS URL Rewrite SEO rule that adds trailing slash only to files that exist?

    - by Sn3akyP3t3
    The default rule template is AddTrailingSlash. I've added another condition that allows the rule to apply to directories and not files, but I'm not sure if this is industry standard. Added: The rule allows for filename that are not standard such as .mobileconfig The web.config contains this rule when the template is applied: <rule name="AddTrailingSlashRule1" enabled="true" stopProcessing="true"> <match url="(.*[^/])$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" pattern="^.*\.[a-z]{1,12}" negate="true" /> </conditions> <action type="Redirect" url="{R:1}/" /> </rule>

    Read the article

  • Is there a specific name for the ".\" (dot-slash) shorthand used to log onto a Windows machine?

    - by HopelessN00b
    I guess the title just about says it all. And yes, .\, not that obsolete \. thing. :) For those who don't know, .\ is a shorthand way of saying "this computer" in Windows at a logon screen, which comes in very handy when you don't know or care about the local computer name but need to authenticate against it anyway, such as through RDP or scripting against a set of shared local users and passwords or even locally, if you're unlucky enough to have to physically go to a machine. Anyway, does this have an actual name, and if so, what is it? I feel kind of stupid saying the dot-slash thing, which is how I've been referring to this.

    Read the article

  • How do I add a trailing slash for Django MPTT-based categorization app?

    - by Patrick Beeson
    I'm using Django-MPTT to develop a categorization app for my Django project. But I can't seem to get the regex pattern for adding a trailing slash that doesn't also break on child categories. Here's an example URL: http://mydjangoapp.com/categories/parentcat/childcat/ I'd like to be able to use http://mydjangoapp.com/categories/parentcat and have it redirect to the trailing slash version. The same should apply to http://mydjangoapp.com/categories/parentcat/childcat (it should redirect to http://mydjangoapp.com/categories/parentcat/childcat/). Here's my urls.py: from django.conf.urls.defaults import patterns, include, url from django.views.decorators.cache import cache_page from storefront.categories.models import Category from storefront.categories.views import SimpleCategoryView urlpatterns = patterns('', url(r'^(?P<full_slug>[-\w/]+)', cache_page(SimpleCategoryView.as_view(), 60 * 15), name='category_view'), ) And here is my view: from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView, DetailView from django.views.generic.detail import SingleObjectTemplateResponseMixin, SingleObjectMixin from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from storefront.categories.models import Category class SimpleCategoryView(TemplateView): def get_category(self): return Category.objects.get(full_slug=self.kwargs['full_slug']) def get_context_data(self, **kwargs): context = super(SimpleCategoryView, self).get_context_data(**kwargs) context["category"] = self.get_category() return context def get_template_names(self): if self.get_category().template_name: return [self.get_category().template_name] else: return ['categories/category_detail.html'] And finally, my model: from django.db import models from mptt.models import MPTTModel from mptt.fields import TreeForeignKey class CategoryManager(models.Manager): def get(self, **kwargs): defaults = {} defaults.update(kwargs) if 'full_slug' in defaults: if defaults['full_slug'] and defaults['full_slug'][-1] != "/": defaults['full_slug'] += "/" return super(CategoryManager, self).get(**defaults) class Category(MPTTModel): title = models.CharField(max_length=255) description = models.TextField(blank=True, help_text='Please use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a> for all text-formatting and links. No HTML is allowed.') slug = models.SlugField(help_text='Prepopulates from title field.') full_slug = models.CharField(max_length=255, blank=True) template_name = models.CharField(max_length=70, blank=True, help_text="Example: 'categories/category_parent.html'. If this isn't provided, the system will use 'categories/category_detail.html'. Use 'categories/category_parent.html' for all parent categories and 'categories/category_child.html' for all child categories.") parent = TreeForeignKey('self', null=True, blank=True, related_name='children') objects = CategoryManager() class Meta: verbose_name = 'category' verbose_name_plural = 'categories' def save(self, *args, **kwargs): orig_full_slug = self.full_slug if self.parent: self.full_slug = "%s%s/" % (self.parent.full_slug, self.slug) else: self.full_slug = "%s/" % self.slug obj = super(Category, self).save(*args, **kwargs) if orig_full_slug != self.full_slug: for child in self.get_children(): child.save() return obj def available_product_set(self): """ Returns available, prioritized products for a category """ from storefront.apparel.models import Product return self.product_set.filter(is_available=True).order_by('-priority') def __unicode__(self): return "%s (%s)" % (self.title, self.full_slug) def get_absolute_url(self): return '/categories/%s' % (self.full_slug)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >