Search Results

Search found 3399 results on 136 pages for 'rule'.

Page 10/136 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • where Redirect permanent rule need to be add

    - by eli1128
    I want redirect my web site http request to https my web site is https://test my apache is version 2.4 and ssl configration is (ssl.conf) on separate file from httpd.conf and I am not using .htaccess file so where I should append. i have tried on both file but didn't work. Redirect permanent / https://test is that should be on my httpd.conf or ssl.conf or did I miss something else. I prefer to use redirect over rewrite. Rewrite.log 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_BAD_REQUEST.html.var 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (3) applying pattern '^(.*)$' to uri '/error/HTTP_BAD_REQUEST.html.var' 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (4) RewriteCond: input='off' pattern='!=on' = matched 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (2) rewrite /error/HTTP_BAD_REQUEST.html.var - *ttps://test/error/HTTP_BAD_REQUEST.html.var[QSA,R=301,L] 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial /redir#1] (2) implicitly forcing redirect (rc=302) with *ttps://test/error/HTTP_BAD_REQUEST.html.var[QSA,R=301,L] 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (1) escaping *ttps://test/error/HTTP_BAD_REQUEST.html.var[QSA,R=301,L] for redirect 10.10.86.1 - - [05/Apr/2012:15:10:19 --0700] [test/sid#7ce00][rid#277448/initial/redir#1] (1) redirect to *ttps://test/error/HTTP_BAD_REQUEST.html.var%5bQSA,R=301,L%5d [REDIRECT/302]

    Read the article

  • Plus sign ( + ) in a rewrite rule (.HTACCESS on Linux Server) (SOLVED)

    - by ienabellamy
    i've this snippet, but it doesn't works. Obviously is that plus sign + tha must be escape ? RewriteCond %{QUERY_STRING} ^orderby=position&controller=search&orderway=desc&search_query=t+max$ RewriteRule ^it/cerca$ http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax? [R=301,L] i want to redirect this url http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=t+max to this http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax Thanks ;) I found the solution, the correct rules are: RewriteCond %{QUERY_STRING} ^orderby=position&controller=search&orderway=desc&search_query=t\+max$ RewriteRule ^it/cerca$ http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax [R=301,L]

    Read the article

  • Url rewrite rule

    - by vvr
    How to redirect a page form show.php?id=(15charstring) to show/(15charstring) I tried like this it is doing reverse means it is redirecting /show/(15chars) to show.php?id=(15chars) RewriteEngine on RewriteRule ^/show/([a-zA-Z0-9]{15})$ http://site.com/show.php?id=$1 Second case is i have to redirect to another page if he added &m=true to the url show.php?id=(15chars)&m=true html/show.php?id=(15chars).

    Read the article

  • DD-WRT firewall rule configuration

    - by ddobie
    I'm using DD-WRT on my linksys router. I want to limit each user on my network to 200 connections at any given time. Does anyone know the rules I enter the firewall in DD-WRT admit panel. I tried the following with no luck: iptables -I FORWARD -s -d 192.168.1.0/24 -p tcp -m connlimit --connlimit-above 150 -j DROP iptables -I FORWARD -s -d 192.168.1.0/24 -p udp -m connlimit --connlimit-above 50 -j DROP

    Read the article

  • Mark assembly App_licenses.dll with AssemblyVersion (FxCop CA1016 rule)

    - by user295479
    Hello everyone, I'm trying to fulfil FxCop's rules in my web site. Since I use some Infragistics controls I have a licenses.licx file that turns into a "app_licenses.dll" assembly after publication. The problem is that this app_licenses.dll assembly does not comply with rule CA1016 (MarkAssembliesWithAssemblyVersion), and I should add an AssemblyVersion attribute to 'App_Licenses.dll'. I found I can add an AssemblyInfo file to my web site and then reference it from the web.config file as following: <compilers> <compiler language="c#;cs;csharp" extension=".cs" compilerOptions="C:\....\AssemblyInfo.cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> <providerOption name="CompilerVersion" value="v3.5" /> <providerOption name="WarnAsError" value="false" /> </compiler> </compilers> AssemblyInfo.cs contains: using System; using System.Reflection; using System.Runtime.InteropServices; using System.Resources; [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguageAttribute("es-ES")] NeutralResourcesLanguageAttribute worked for another auto-generated dll in the web site (app_GlobalResources.dll) for another FxCop rule, but app_licenses.dll seems to ignore the assembly info and still pops up the same CA1016 error. Any help would be much appreciated.

    Read the article

  • How to disable mod_security2 rule (false positive) for one domain on centos 5

    - by nicholas.alipaz
    Hi I have mod_security enabled on a centos5 server and one of the rules is keeping a user from posting some text on a form. The text is legitimate but it has the words 'create' and an html <table> tag later in it so it is causing a false positive. The error I am receiving is below: [Sun Apr 25 20:36:53 2010] [error] [client 76.171.171.xxx] ModSecurity: Access denied with code 500 (phase 2). Pattern match "((alter|create|drop)[[:space:]]+(column|database|procedure|table)|delete[[:space:]]+from|update.+set.+=)" at ARGS:body. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "352"] [id "300015"] [rev "1"] [msg "Generic SQL injection protection"] [severity "CRITICAL"] [hostname "www.mysite.com"] [uri "/node/181/edit"] [unique_id "@TaVDEWnlusAABQv9@oAAAAD"] and here is /usr/local/apache/conf/modsec2.user.conf (line 352) #Generic SQL sigs SecRule ARGS "((alter|create|drop)[[:space:]]+(column|database|procedure|table)|delete[[:space:]]+from|update.+set.+=)" "id:1,rev:1,severity:2,msg:'Generic SQL injection protection'" The questions I have are: What should I do to "whitelist" or allow this rule to get through? What file do I create and where? How should I alter this rule? Can I set it to only be allowed for the one domain, since it is the only one having the issue on this dedicated server or is there a better way to exclude table tags perhaps? Thanks guys

    Read the article

  • Exclude subdirectory from rewrite rule in web.config

    - by Clog
    This question comes up often, but I can only find solutions for PHP, Apache, htaccess etc but not for web.config I would like my pages to return in HTTP not HTTPS, except for forms within certain subdirectories. I have created the following web.config file, but how do I exclude a subdirectory called forms. <configuration> <system.webServer> <rewrite> <rules> <rule name="Force all to HTTP" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="on" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="http://www.mysite.com/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Many thanks all you clever clogs.

    Read the article

  • WinForms DataGridView - update database

    - by Geo Ego
    I know this is a basic function of the DataGridView, but for some reason, I just can't get it to work. I just want the DataGridView on my Windows form to submit any changes made to it to the database when the user clicks the "Save" button. I populate the DataGridView according to a function triggered by a user selection in a DropDownList as follows: using (SqlConnection con = new SqlConnection(conString)) { con.Open(); SqlDataAdapter ruleTableDA = new SqlDataAdapter("SELECT rule.fldFluteType AS [Flute], rule.fldKnife AS [Knife], rule.fldScore AS [Score], rule.fldLowKnife AS [Low Knife], rule.fldMatrixScore AS [Matrix Score], rule.fldMatrix AS [Matrix] FROM dbo.tblRuleTypes rule WHERE rule.fldMachine_ID = '1003'", con); DataSet ruleTableDS = new DataSet(); ruleTableDA.Fill(ruleTableDS); RuleTable.DataSource = ruleTableDS.Tables[0]; } In my save function, I basically have the following (I've trimmed out some of the code around it to get to the point): using (SqlDataAdapter ruleTableDA = new SqlDataAdapter("SELECT rule.fldFluteType AS [Flute], rule.fldKnife AS [Knife], rule.fldScore AS [Score], rule.fldLowKnife AS [Low Knife], rule.fldMatrixScore AS [Matrix Score], rule.fldMatrix AS [Matrix] FROM dbo.tblRuleTypes rule WHERE rule.fldMachine_ID = '1003'", con)) { SqlCommandBuilder commandBuilder = new SqlCommandBuilder(ruleTableDA); DataTable dt = new DataTable(); dt = RuleTable.DataSource as DataTable; ruleTableDA.Fill(dt); ruleTableDA.Update(dt); } Okay, so I edited the code to do the following: build the commands, create a DataTable based on the DataGridView (RuleTable), fill the DataAdapter with the DataTable, and update the database. Now ruleTableDA.Update(dt) is throwing the exception "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."

    Read the article

  • How do I refactor code into a subroutine but allow for early exit?

    - by deworde
    There's a really obvious refactoring opportunity in this (working) code. bool Translations::compatibleNICodes(const Rule& rule, const std::vector<std::string>& nicodes) { bool included = false; // Loop through the ni codes. for(std::vector<std::string> iter = nicodes.begin(); iter != nicodes.end(); ++iter) { // Match against the ni codes of the rule if(rule.get_ni1() == *iter) { // If there's a match, check if the rule is include or exclude const std::string flag = rule.get_op1(); // If include, code is included unless a later rule excludes it if(flag == "INCLUDE"){ included = true; } // If exclude, code is specifically excluded else if(flag == "EXCLUDE"){ return false; } } if(rule.get_ni2() == *iter) { const std::string flag = rule.get_op2(); if(flag == "INCLUDE"){ included = true; } else if(flag == "EXCLUDE"){ return false; } } if(rule.get_ni3() == *iter) { const std::string flag = rule.get_op3(); if(flag == "INCLUDE"){ included = true; } else if(flag == "EXCLUDE"){ return false; } } if(rule.get_ni4() == *iter) { const std::string flag = rule.get_op4(); if(flag == "INCLUDE"){ included = true; } else if(flag == "EXCLUDE"){ return false; } } if(rule.get_ni5() == *iter) { const std::string flag = rule.get_op5(); if(flag == "INCLUDE"){ included = true; } else if(flag == "EXCLUDE"){ return false; } } } return included; } The problem is that I can't get around the problem that I want to exit early if it's an exclude statement. Note that I can't change the structure of the Rule class. Any advice?

    Read the article

  • Async validation rule in csla

    - by Steve
    Does anyone have a simple example of implementing an async validation rule in csla? I have looked at the example in the Company class in the Rolodex sample but this isn't particularly clear to me: why do I need a command class? I'm using csla 3.8 in a WPF application.

    Read the article

  • CSS text-decoration rule ignored

    - by Ferdy
    I have found similar questions to mine but none of the suggestions seems to apply to my situation, so here goes... I have a webpage with a buch of images on them. Each image has a title which in markup is between h2 tags. The title is a link, so the resulting markup is like this: <ul class="imagelist"> <li> <a href=""><h2>Title 1</h2></a> <a href=""><img src="" /></a> </li> <li> Image 2, etc... </li> </ul> All I want is for the title links to not be underlined. I tried to address this like this: .imagelist li a h2 { color:#333; text-decoration:none; } It completely ignores the text-decoration rule, yet respects the color rule. From other questions I learned that this could be because a child element cannot overrule the text-decoration of any of its parents. So, I went looking for the parent elements to see if any explicit text-decoration rules are applied. I found none. This is driving me crazy, any help? For the sake of completeness, here is the Firebug CSS output, which shows the full inheritance and such. Probably more than you want, but I cannot see anything conflicting here. .imagelist li a h2 { color:#333333; text-decoration:none; } main.css (line 417) h2 { font-size:14px; } main.css (line 40) h1, h2, h3, h4, h5, h6 { display:block; font-weight:bold; margin-bottom:10px; } main.css (line 38) h1, h2, h3, h4, h5, h6 { font-size:100%; font-weight:normal; } reset-min.css (line 7) body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { margin:0; padding:0; } reset-min.css (line 7) Inherited froma /apps/ju...mage/745 a { color:#0063E2; } main.css (line 55) Inherited fromli .imagelist li { list-style-type:none; } main.css (line 411) li { list-style:none outside none; } reset-min.css (line 7) Inherited fromul.imagelist .imagelist { border-collapse:collapse; font-size:9px; } main.css (line 410) Inherited frombody body, form { color:#333333; font:12px arial,helvetica,clean,sans-serif; } main.css (line 36) Inherited fromhtml html { color:#000000;

    Read the article

  • Error with Drools .brl to .drl rule conversion - Adding dynamic rules

    - by jillika iyer
    Hi, I want to add rules dynamically in drools. What is the main plus point of using KNowledge builder?? Or is it better to just list the Files in the rules directory and add it to my program?? But in this case when I convert from a .brl to .drl file at runtime - my new created .drl is not detected. How can I update the new rule and add it at runtime?? Please help. Thank you J

    Read the article

  • Need Help Customizing a Grammar Checking Replace Rule in Java

    - by user567785
    Hello, I am currently adding the Khmer (Cambodian) language to LanguageTool, an opensource grammar checker for OpenOffice (http://www.languagetool.org). I don't know enough Java to customize one of the scripts and wanted to make a request here asking if anyone would be willing to customize it for me (I can put link to your website at http://www.sbbic.org/lang/en-us/volunteer/ if you help). Here is the script that needs customization KhmerWordCoherencyRule.java: /* LanguageTool, a natural language style checker * Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ package de.danielnaber.languagetool.rules.km; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.ResourceBundle; import de.danielnaber.languagetool.AnalyzedSentence; import de.danielnaber.languagetool.AnalyzedToken; import de.danielnaber.languagetool.AnalyzedTokenReadings; import de.danielnaber.languagetool.JLanguageTool; import de.danielnaber.languagetool.tools.StringTools; import de.danielnaber.languagetool.rules.Category; import de.danielnaber.languagetool.rules.RuleMatch; /** * A Khmer rule that matches words or phrases which should not be used and suggests * correct ones instead. Loads the relevant words from * <code>rules/km/coherency.txt</code>, where km is a code of the language. * * @author Andriy Rysin */ public abstract class KhmerWordCoherencyRule extends KhmerRule { private static final String FILE_ENCODING = "utf-8"; private Map<String, String> wrongWords; // e.g. "????? -> "?????" private static final String FILE_NAME = "/km/coherency.txt"; public abstract String getFileName(); public String getEncoding() { return FILE_ENCODING; } /** * Indicates if the rule is case-sensitive. Default value is <code>true</code>. * @return true if the rule is case-sensitive, false otherwise. */ //in Khmer there is no case public boolean isCaseSensitive() { return false; } /** * @return the locale used for case conversion when {@link #isCaseSensitive()} is set to <code>false</code>. */ public Locale getLocale() { return Locale.getDefault(); } public KhmerWordCoherencyRule(final ResourceBundle messages) throws IOException { if (messages != null) { super.setCategory(new Category(messages.getString("category_misc"))); } wrongWords = loadWords(JLanguageTool.getDataBroker().getFromRulesDirAsStream(getFileName())); } public String getId() { return "KM_WORD_COHERENCY"; } public String getDescription() { return "Checks for wrong words/phrases"; } public String getSuggestion() { return " does not match your previous spelling of the word, use "; } public String getShort() { return "Use a consistant spelling throughout"; } public final RuleMatch[] match(final AnalyzedSentence text) { final List<RuleMatch> ruleMatches = new ArrayList<RuleMatch>(); final AnalyzedTokenReadings[] tokens = text.getTokensWithoutWhitespace(); for (int i = 1; i < tokens.length; i++) { final String token = tokens[i].getToken(); final String origToken = token; final String replacement = isCaseSensitive()?wrongWords.get(token):wrongWords.get(token.toLowerCase(getLocale())); if (replacement != null) { final String msg = token + getSuggestion() + replacement; final int pos = tokens[i].getStartPos(); final RuleMatch potentialRuleMatch = new RuleMatch(this, pos, pos + origToken.length(), msg, getShort()); if (!isCaseSensitive() && StringTools.startsWithUppercase(token)) { potentialRuleMatch.setSuggestedReplacement(StringTools.uppercaseFirstChar(replacement)); } else { potentialRuleMatch.setSuggestedReplacement(replacement); } ruleMatches.add(potentialRuleMatch); } } return toRuleMatchArray(ruleMatches); } private Map<String, String> loadWords(final InputStream file) throws IOException { final Map<String, String> map = new HashMap<String, String>(); InputStreamReader isr = null; BufferedReader br = null; try { isr = new InputStreamReader(file, getEncoding()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { line = line.trim(); if (line.length() < 1) { continue; } if (line.charAt(0) == '#') { // ignore comments continue; } final String[] parts = line.split(";"); if (parts.length != 2) { throw new IOException("Format error in file " + JLanguageTool.getDataBroker().getFromRulesDirAsUrl(getFileName()) + ", line: " + line); } map.put(parts[0], parts[1]); } } finally { if (br != null) { br.close(); } if (isr != null) { isr.close(); } } return map; } public void reset() { } } Here is what I need the SimpleReplaceRule.java to do: 1 - Be able to have more than two spelling variations in the coherency.txt file (right now it can only be Word1;Word2). 2 - Find the first use of ANY of the spelling variations in a document that are found in coherency.txt and then make sure only that spelling is used throughout the document (ex. in the coherency.txt I have Word1;Word2;Word3 then in my document on the first line I write Word2. then on next line I write Word1 and Word 3 - then the grammar checker will flag Word1 and Word3 saying that I should use the spelling "Word2" instead...etc.). If anyone can help I would be grateful! Thanks for your time, Nathan

    Read the article

  • UserForm in script run from Outlook Rule

    - by Asgeir S. Nilsen
    Based on http://support.microsoft.com/kb/306108 I'd like to create a custom rule that shows a custom UserForm instead of the plain old MsgBox. What I wrote was this: Dim alerts As CustomAlerts Sub CustomMailMessageRule(Item As Outlook.MailItem) alerts.Messages.AddItem Item.Subject alerts.Show End Sub CustomAlerts is a UserForm containing a single ListBox. Sadly my attempt does not work -- no window appears. What am I doing wrong?

    Read the article

  • validating utf-8 in htaccess rewrite rule

    - by TrustWeb
    i validate urls with utf-8 characters with a rewrite rule RewriteRule ^([a-z]{2})/([a-z0-9-]{1,256})/([[:print:]]{1,256})$ index.php?language=$1&categories=$2&get_query=$3 [L] $get_query is the point, this accepts: test!?!'"<*+ but fails for accented chars as àèéìòù, or other utf-8 for example in wikipedia this works great: http://en.wikipedia.org/wiki/%E6%B1%89%E8%AF%AD_%E6%BC%A2%E8%AA%9E any help? :-)

    Read the article

  • jQuery - How to dynamically add a validation rule

    - by Justin
    Hey, I'm trying to dynamically add a validation rule to some dynamic controls: $("input[id*=Hours]").rules("add", "required"); However this line gives me the following error: $.data(element.form, "validator") is null Defining rules the static way with the validate function works fine. What am I doing wrong? Thanks, Justin

    Read the article

  • error while using cancan in ruby: "uninitialized constant CanCan::Rule::Mongoid"

    - by Ran
    here is my controller: class AdminController < ApplicationController before_filter :require_user authorize_resource :class => false def index end def users_list end end here is my Ability class: class Ability include CanCan::Ability def initialize(user) if user.admin? can :manage, :all else can :read, :all end end end when trying to access "/admin/users_list" (with an admin user or without) i get the following error: uninitialized constant CanCan::Rule::Mongoid any thoughts?

    Read the article

  • [validate plugin] custom rule error

    - by vitto
    hi i have added a rule to my form but i can't understand why it does not work!! http://www.pipelabitta.it/form/ This is an example page: the rules is that the check box must be checked and there must be a valid date. From firefox console i can see it returns true or false as i need but the validation does not get triggered. Why is that? Thanks Vitto

    Read the article

  • Mod Rewrite Rule not matching certain words

    - by Andy Gee
    I'm no expert in mod_rewrite at all and I'm trying to add a condition to the rule below to: match which is not equal to 'share' not match anything with a dot in it RewriteRule ^([^/]*)$ http://domain.com/directory/index.php?key=$1 [L] http://domain.com/directory/share will not be matched (share) http://domain.com/directory/foo.php will not be matched (contains a dot) http://domain.com/directory/abcde will be matched http://domain.com/directory/abcde-4 will be matched All ULRs will not have a trailing slash Any help will be much appreciated

    Read the article

  • Interpret a rule applying multiple xpath queries on multiple XML documents

    - by Damien
    Hi, I need to build a component which would take a few XML documents in input and check the following kind of rules: XML1:/bookstore/book[price>35.00] != null and (XML2:/city/name = 'Montreal' or XML3://customer[@language] contains 'en') Basically my component should be able to: substitute the XML tokens with the corresponding XML document(before colon) apply xpath query on this XML document check the xpath output against expected result ("=", "!=", "contains") follow the basic syntax ("and", "or" and parentheses) tell if the rule is true or false Do you know any library which could help me? maybe JavaCC? Thanks

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >