Search Results

Search found 3764 results on 151 pages for 'mod alias'.

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

  • mod rewrite works fine apart from for missing directory index files

    - by j w
    I have a legacy web site hosted on Apache. It has a number of web pages sitting in the public web root and its subfolders. publicDocs/ directorywith_no_defaultfile/ some-legacy-flat-page.htm .htaccess index.php some-legacy-flat-page.htm I would like to start using Zend MVC for some of the newer pages. I have got a .htaccess mod rewrite rule working so that any request for a non-existent file is sent to be handled by the MVC bootstrap file (/index.php). With my current set-up, the following types of requests are routed to '/index.php', the MVC bootstrap: /index.php /blah /directorywith_no_defaultfile/bloo The following types of request are served by old legacy (flat) pages /some-legacy-flat-page.htm /directorywith_no_defaultfile/some-legacy-flat-page.htm But, when I a request a non-existent file that is a directory like these: /directorywith_no_defaultfile or /directorywith_no_defaultfile/ I get an error: Forbidden You don't have permission to access /directorywith_no_defaultfile/ on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I suspect this may have something to do with the way Apache handles default files. Do you know which Apache directives could be causing this?

    Read the article

  • Bash alias and bash function with several arguments

    - by sanemat
    I want to use both bash alias and bash function with several arguments. I emulate svn sub commands. $ svngrep -nr 'Foo' . $ svn grep -nr 'Foo' . My expectation is both act as below: grep --exclude='*.svn-*' --exclude='entries' -nr 'Foo' . But actual, only alias ('svngrep') does well, function ('svn grep') causes invalid option error. How to write my .bashrc? #~/.bashrc alias svngrep="grep --exclude='*.svn-*' --exclude='entries'" svn() { if [[ $1 == grep ]] then local remains=$(echo $@ | sed -e 's/grep//') command "$svngrep $remains" else command svn "$@" fi }

    Read the article

  • MySQL INSERT with table alias

    - by Max Kielland
    Hello, I happen to have two columns having the same name as two SQL reserved words, Key and Value. When using the SELECT statement I can create a table alias and solve it that way. Now I'm trying to INSERT data and it seems like you can't create table alias in the INSERT statement. INSERT INTO attributeStrings ats (ats.ItemID,ats.Key,ats.Value) VALUES (3,'Categories','TechGUI') I get error at 'ats (ats.ItemID,ats.Key,ats.Value) VALUES (3,'Categories','TechGUI')' indicating that alias can't be created. Are there any ways to solve this without renaming the columns Key and Value?

    Read the article

  • mod evasive not working properly on ubuntu 10.04

    - by Joe Hopfgartner
    I have an ubuntu 10.04 server where I installed mod_evasive using apt-get install libapache2-mod-evasive I already tried several configurations, the result stays the same. The blocking does work, but randomly. I tried with low limis and long blocking periods as well as short limits. The behaviour I expect is that I can request websites until either page or site limit is reached per given interval. After that I expect to be blocked until I did not make another request for as long as the block period. However the behaviour is that I can request sites and after a while I get random 403 blocks, which increase and decrase in percentage, however they are very scattered. This is an output of siege, so you get an idea: HTTP/1.1 200 0.09 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.11 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.09 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.09 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.09 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.10 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.08 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.09 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.10 secs: 75 bytes ==> /robots.txt HTTP/1.1 403 0.09 secs: 242 bytes ==> /robots.txt HTTP/1.1 200 0.09 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.09 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.10 secs: 75 bytes ==> /robots.txt HTTP/1.1 200 0.08 secs: 75 bytes ==> /robots.txt The exac limits in place during this test run were: DOSHashTableSize 3097 DOSPageCount 10 DOSSiteCount 100 DOSPageInterval 10 DOSSiteInterval 10 DOSBlockingPeriod 120 DOSLogDir /var/log/mod_evasive DOSEmailNotify ***@gmail.com DOSWhitelist 127.0.0.1 So I would expect to be blocked at least 120 seconds after being blocked once. Any ideas aobut this? I also tried adding my configuration at different places (vhost, server config, directory context) and with of without ifmodule directive... This doesnt change anything.

    Read the article

  • How to alias a hostname on Mac OSX

    - by Austin
    In a nutshell, I would like to be able to open a browser and open local.example.com but it actually loads http://localhost/path/to/example.com/ I am using Mac OSX 10.5, and not afraid to get my hands dirty with the terminal :)

    Read the article

  • .htaccess redirection resulting alias plus directory name

    - by austin cheney
    I am using .htaccess file to redirect all web traffic in a folder to ssl, because the directory prompts users for a login. When a user logs in they are redirected from https://subdir.mailmarkup.org/ to https://subdir.mailmarkup.org/~homedir/subdir. I want users to be redirected from http to https, and this is occuring successfully, however, I do not want users redirected from the first path mentioned above to the second. How do I prevent this?

    Read the article

  • Double request from mod-rewrite

    - by Dave
    I've written a module that sets Apache environment variables to be used by mod-rewrite. It hooks into ap_hook_post_read_request() and that works fine, but if mod-rewrite matches a RewriteRule then it makes a second call to my request handler with the rewritten URL. This looks like a new request to me in that the environment variables are no longer set and therefore I have to execute my (expensive) code twice for each hit. What am I doing wrong, or is there a work around for this? Thanks

    Read the article

  • Mod Rewirte Question.

    - by delimit
    I cant seem to get Example 1 to turn into Example 2 using mod rewrite. Can someone help me out? Example 1 http://www.example.com/info/index.php?uid=123 Example 2 http://www.example.com/123 Mod rewrite code. Options +FollowSymLinks Options -Indexes RewriteEngine on RewriteBase /info RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/info/$1 [R=301,L] RewriteRule ^([^/]*)$ /info/index.php?uid=$1 [L]

    Read the article

  • Ruby Doesn't Recognize Alias Method

    - by Jesse J
    I'm trying to debug someone else's code and having trouble figuring out what's wrong. When I run rake, one of the errors I get is: 2) Error: test_math(TestRubyUnits): NoMethodError: undefined method `unit_sin' for CMath:Module /home/user/ruby-units/lib/ruby_units/math.rb:21:in `sin' This is the function that calls the method: assert_equal Math.sin(pi), Math.sin("180 deg".unit) And this is what the class looks like: module Math alias unit_sin sin def sin(n) Unit === n ? unit_sin(n.to('radian').scalar) : unit_sin(n) end alias unit_cos cos def cos(n) Unit === n ? unit_cos(n.to('radian').scalar) : unit_cos(n) end ... module_function :unit_sin module_function :sin module_function :unit_cos module_function :cos ... end (The ellipsis means "more of the same"). As far as I can see, this is valid Ruby code. Is there something I'm missing here that's causing the error, or could the error be coming from something else? Update: I'm wondering if the problem has to do with namespaces. This code is attempting to extend CMath, so perhaps the alias and/or module_function isn't actually getting into CMath, or something like that....

    Read the article

  • Ruby Alias and module_function

    - by Jesse J
    I'm trying to debug someone else's code and having trouble figuring out what's wrong. When I run rake, one of the errors I get is: 2) Error: test_math(TestRubyUnits): NoMethodError: undefined method `unit_sin' for CMath:Module /home/user/ruby-units/lib/ruby_units/math.rb:21:in `sin' This is the function that calls the method: assert_equal Math.sin(pi), Math.sin("180 deg".unit) And this is what the class looks like: module Math alias unit_sin sin def sin(n) Unit === n ? unit_sin(n.to('radian').scalar) : unit_sin(n) end alias unit_cos cos def cos(n) Unit === n ? unit_cos(n.to('radian').scalar) : unit_cos(n) end ... module_function :unit_sin module_function :sin module_function :unit_cos module_function :cos ... end (The ellipsis means "more of the same"). As far as I can see, this is valid Ruby code. Is there something I'm missing here that's causing the error, or could the error be coming from something else? Update: I'm wondering if the problem has to do with namespaces. This code is attempting to extend CMath, so perhaps the alias and/or module_function isn't actually getting into CMath, or something like that....

    Read the article

  • SQL - table alias scope.

    - by Support - multilanguage SO
    I've just learned ( yesterday ) to use "exists" instead of "in". BAD select * from table where nameid in ( select nameid from othertable where otherdesc = 'SomeDesc' ) GOOD select * from table t where exists ( select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' ) And I have some questions about this: 1) The explanation as I understood was: "The reason why this is better is because only the matching values will be returned instead of building a massive list of possible results". Does that mean that while the first subquery might return 900 results the second will return only 1 ( yes or no )? 2) In the past I have had the RDBMS complainin: "only the first 1000 rows might be retrieved", this second approach would solve that problem? 3) What is the scope of the alias in the second subquery?... does the alias only lives in the parenthesis? for example select * from table t where exists ( select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeDesc' ) AND select nameid from othertable o where t.nameid = o.nameid and otherdesc = 'SomeOtherDesc' ) That is, if I use the same alias ( o for table othertable ) In the second "exist" will it present any problem with the first exists? or are they totally independent? Is this something Oracle only related or it is valid for most RDBMS? Thanks a lot

    Read the article

  • Grand Theft Auto IV – Awesome Ghost Rider Mod [Videos]

    - by Asian Angel
    Recently we shared the video for a terrific Back to the Future GTA IV mod with you and today we are back with videos for a wicked Ghost Rider mod. One thing is sure, with Ghost Rider cruising through town the nights in Liberty City have never been hotter! Note: Videos contain some language that may be considered inappropriate. The first video focuses on the main working mod while the second focuses on the new ‘Wall Ride’ feature that sees Ghost Rider going up and down walls. How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • route port 3000 to apache2 alias

    - by user223470
    I have a meteor application running on port 3000. I can successfully connect to the program with www.myurl.com:3000, but would rather connect to it via www.myurl.com/myappname. I started with the instructions on this web site: http://www.andrehonsberg.com/article/deploy-meteorjs-vhosts-ubuntu1204-mongodb-apache-proxy and I have the following Apache configuration file: <VirtualHost *:80> ServerName myurl.com ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:3000/ ProxyPassReverse http://localhost:3000/ </Location> </VirtualHost> I do not know how to continue from here to get the program on www.mysite.com/myapp. In other situations, I would use an Alias within the Apache configuration file, but that doesn't seem like the right direction to go in this case. How do I configure Apache to send port 3000 to www.myurl.com/myapp?

    Read the article

  • Mod_rewrite on Alias directory

    - by crunchline
    I am moving from a WIMP setup to a WAMP setup. My images are on a separate drive. I need a default image served, when a file is not found. Currently it returns a 404 on images not found in the /images directory, and the 404.jpg is displayed for files not found on all the other directories. I tried changing [L] to [PT] but that did not do anything. in httpd.conf Alias /images "D:/images" in .htaccess RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^.*\.(gif|jpg|png)$ /404.jpg [L]

    Read the article

  • Can I have a shell alias evaluate a history substitution command?

    - by Brandon
    I'm trying to write an alias for cd !!:1, which takes the 2nd word of the previous command, and changes to the directory of that name. For instance, if I type rails new_project cd !!:1 the second line will cd into the "new_project" directory. Since !!:1 is awkward to type (even though it's short, it requires three SHIFTed keys, on opposite sides of of the keyboard, and then an unSHIFTed version of the key that was typed twice SHIFTed), I want to just type something like cd- but since the !!:1 is evaluated on the command line, I (OBVIOUSLY) can't just do alias cd-=!!:1 or I'd be saving an alias that contained "new_project" hard-coded into it. So I tried alias cd-='!!:1' The problem with this is that the !!:1 is NEVER evaluated, and I get a message that no directory named !!:1 exists. How can I make an alias where the history substitution is evaluated AT THE TIME I ISSUE THE ALIAS COMMAND, not when I define the alias, and not never? (I've tried this in both bash and zsh, and get the same results in both.)

    Read the article

  • mod-rewrite: Replacing some characters in a url

    - by GeorgeCalm
    Is it possible to replace some forward slashes (/) of a URL to dots (.) in a RewriteRule? It doesn't have to be done exclusively with a RewriteRule, but definitely not with a script. Example 1: INPUT: /document/my/document.html OUTPUT: /document-my.document.html Example 2: INPUT: /document/depth/of/path/can/vary.html OUTPUT: /document-depth.of.path.can.vary.html

    Read the article

  • mod rewrite regex

    - by bbutle01
    The plan is to take domain.com/chat2/roomnumber and redirect to domain.com/chat2/index.php?room_id=roomnumber. Here's my code that's NOT workin: RewriteEngine on RewriteRule ^/chat2/([a-z0-9_-]+)/$ /index.php?room_id=$1 [NC,L] RewriteRule ^/chat2/([a-z0-9_-]+)$ /index.php?room_id=$1 [NC,L] I get sent to the 404 page. I'm guessing the problem is my placement of the ^ but I'm not certain.

    Read the article

  • Covert mod-rewrite to lighttpd for lessn url shortener

    - by JonKratz
    I am trying to use lessn, a url shortener by Shaun Inman, on my lighttpd server and he uses a .htaccess file for the redirect. I am not very good with Mod_Rewrite isn the first place otherwise some simple googling would have sufficed to convert this for lighttpd. As it is, I do not know what the 2nd and 3rd lines of the Mod_Rewrite are doing, so I cannot convert. I'd appreciate anyone's advice on those so I can have it working as it should. Thank you! <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*) index.php?token=$1 [QSA,L] </IfModule>

    Read the article

  • mod rewrite help

    - by Benny B
    Ok, I don't know regex very well so I used a generator to help me make a simple mod_rewrite that works. Here's my full URL https://www.huttonchase.com/prodDetails.php?id_prd=683 For testing to make sure I CAN use this, I used this: RewriteRule prodDetails/(.*)/$ /prodDetails.php?id_prd=$1 So I can use the URL http://www.huttonchase.com/prodDetails/683/ If you click it, it works but it completely messes up the relative paths. There are a few work-arounds but I want something a little different. https://www.huttonchase.com/prod_683_stainless-steel-flask I want it to see that 'prod' is going to tell it which rule it's matching, 683 is the product number that I'm looking up in the database, and I want it to just IGNORE the last part, it's there only for SEO and to make the link mean something to customers. I'm told that this should work, but it's not: RewriteRule ^prod_([^-]*)_([^-]*)$ /prodDetails.php?id_prd=$1 [L] Once I get the first one to work I'll write one for Categories: https://www.huttonchase.com/cat_11_drinkware And database driven text pages: https://www.huttonchase.com/page_44_terms-of-service BTW, I can flip around my use of dash and underscore if need be. Also, is it better to end the URLs with a slash or without? Thanks!

    Read the article

  • Is there any proper documentation for mod-evasive?

    - by Question Overflow
    mod_evasive20 is one of the loaded modules on my httpd server. I read good things about how it can stop a DOS attack and wanted to try it out on my localhost. A search for mod_evasive turns up a blog post by the author which briefly describes what it does. Other than that, I can't seem to find a reference or a documentation on the apache modules site. I was wondering whether it is a module recognised by Apache since there is no mention of it on its website. I have a mod_evasive.conf file sitting in the /etc/http/conf.d folder that contains the following lines: LoadModule evasive20_module modules/mod_evasive20.so <IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 2 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 10 </IfModule> My understanding from the setting is that if I were to click refresh or send a form more than two times in a one second interval, apache will issue a 403 error and bar me from the site for 10 seconds. But that is not happening on my localhost. And I would like to know the reason. Thanks.

    Read the article

  • mod-rewrite to ignore the subdomain

    - by amanuo
    I'm using a mod-rewrite for pretty URLs, meant to run on the domain root. Working fine but now I'm trying to make it run on a subdomain and it keeps giving "500 Internal Server Error". The subdomain automatically redirects to the folder with that name on my hosting account (sub.domain.com shows the content of domain.com/sub/). Does it fail because this request is already being mod-rewritten automatically or can I simply change something in the htaccess to address the subdomain instead? Options +FollowSymLinks IndexIgnore */* RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php

    Read the article

  • RewriteCond and Alias

    - by Ralphz
    I have defined alias that looks like this: Alias /pictures/sm/ /var/www/my_site/data/_active_thumbnails/ Later in the VirtualHost section have: DocumentRoot /var/www/my_site/sites/www.my_site.com/htdocs RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/thumbnails/(.*)\.(jpg|JPG) /images/stg-list-img.png [PT,L] What I'm trying to do is to display /images/stg-list-img.png placeholder image only if the original image does not exist on the drive. Right now it's replacing all the images from /thumbnails/. It looks like the RewriteCond is not aware about the Alias. Is there the way to overcome it? Thanks

    Read the article

  • What is the alternative of Apache's global Alias in IIS? (e.g. Alias /phpMyAdmin "c:/AppServ/www/phpMyAdmin")

    - by Sk8erPeter
    I know there's an "Add Virtual Directory..." option in every given sites in IIS with which I can set up e.g. phpMyAdmin's path to be reached with prepending /phpmyadmin to the address (e.g. http://example.com/phpmyadmin), but isn't there a "global" setting similar to Apache's Alias? For example, in Apache this setting looks like this: <IfModule mod_alias.c> Alias /phpMyAdmin "c:/AppServ/www/phpMyAdmin" Alias /phpmyadmin "c:/AppServ/www/phpMyAdmin" </IfModule> This way I reach phpmyadmin with every hosts. (http://example1.com/phpmyadmin, http://example2.com/phpmyadmin also does work) But in IIS, do I have to add a virtual directory to every sites? I'm just curious, because we would like to serve some domain's content, so there would be multiple sites. It would be more comfortable to do it once (or have the opportunity to remove it once), but if I have to, I do add a virtual directory for each sites. (I know, maybe it's the better solution, because I can have a site where I don't want phpmyadmin to be available, but I was just curious.) Thanks in advance!

    Read the article

  • Table Alias in SubSonic

    - by rockacola
    How can I assign alias to tables with SubSonic 2.1? I am trying to reproduce the following query: SELECT * FROM posts P RIGHT OUTER JOIN post_meta X ON P.post_id = X.post_id RIGHT OUTER JOIN post_meta Y ON P.post_id = Y.post_id WHERE X.meta_key = "category" AND X.meta_value = "technology" AND Y.meta_key = "keyword" AND Y.meta_value = "cloud" I'm am using SubSonic 2.1 and upgrading to 2.2 isn't an option (yet). Thanks.

    Read the article

  • mod rewrite to remove facebook query string

    - by user905752
    I can't get my query string to work..please help... I have the following url: http://betatest.bracknell-forest.gov.uk/help?fb_action_ids=372043216205703&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582 (sorry but the page will be unavailable as it is a test internal domain link) I want the following url: http://betatest.bracknell-forest.gov.uk/help I get a browser message saying 'The system cannot find the file specified.' I know it is because I already have a mod rewrite to remove the .htm from the page name to return clean urls but I don't know what I need to do to accept a clean url and return the page. Here is the mod rewrite code I have: RewriteRule ^/([\w]+)$ /$1.htm [I,L] #Any bare URL will get rewritten to a URL with .htm appended RedirectRule ^/(.+)\.(htm)$ http://betatest.bracknell-forest.gov.uk/$1 [R=301] RewriteCond %{QUERY_STRING} ^fb_action_ids=(.)$ #if the query string contains fb_action_ids RewriteCond %{QUERY_STRING} !="" #if there is a query string RewriteRule ^(.*) $1? [R=301,L] I think it is because I am using R=301 twice but do not know what I need to use as an alternative. If I append .htm from help?fb_action_ids.... to help.htm?fb_action_ids.... this returns the required page fine but I need to return the page name for the non appended url. Many thanks for any help in advance.

    Read the article

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