Search Results

Search found 4313 results on 173 pages for 'mod rewrite'.

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

  • rewrite on urls to add “/”

    - by Jean
    Hello, I know how to rewrite urls to redirect to a page. When the "/" is not at the end of www.DomainName.com/user/myUserName the redirect works: RewriteRule /$ /user/index.php When I write RewriteBase / the above rule does not work, but a 404 error. How to add a "/" at the end of www.DomainName.com/user/myUserName/ and still redirect to /user/index.php. This can be written into the .htaccess or httpd.conf Thanks Jean

    Read the article

  • Redirect/rewrite dynamic URL to sub-domain and create DNS for subdomain

    - by Abdul Majeed
    I have created an application in PHP, I would like to re-direct the following URL to corresponding sub-domain. Dynamic URL pattern: http://mydomain.com/mypage.php?user_name=testuser I wish to re-direct this to the corresponding sub domain: http://testuser.mydomain.com/ How do I create a rewrite rule for this purpose? How do I register DNS for sub-domain without using CPANEL? (I want to activate sub-domain when the user registers to the system.)

    Read the article

  • I need a little help with .htaccess rewrite

    - by Pinokyo
    I need a little help with .htaccess file I have songs, singers and albums links I want to rewrite. I all ready rewrote the links and they are like this: the links for the songs is like this: /song/song_name for singers: /singer_name for albums: /album_name From my .htaccess file: RewriteEngine on RewriteRule ^singer/([^/\.]+)/?$ /core/controller.php?singer=$1 [L] RewriteRule ^song/([^/\.]+)/?$ /core/controller.php?song=$1 [L] RewriteRule ^album/([^/\.]+)/?$ /core/controller.php?album=$1 [L] I need the links for the songs, singers and albums to be like this: for songs /singer_name/song_name for singers /singer_name for albums /singer_name/album_name can anyone help me with this please.

    Read the article

  • .htaccess rewrite , parked domain on another site to read the proper domain name

    - by Stefano
    I have a parked domain ¨mysite.co.uk¨ on another domain name webspace in a folder and need to rewrite the mysite.co.uk domain name in the browser URL as it currently shows the Other domain name while browsing and i need it to read mysite.co.uk. When parking the domain the isp automatically added this which works although displays anotherdomain name. RewriteCond %{HTTP_HOST} ^mysite.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.mysite.co.uk$ RewriteRule ^/?$ "http\://www.otherdomain.eu/myfolder" [R=301,L]

    Read the article

  • htaccess url rewrite

    - by user761396
    i used to have a rewrite rule to RewriteRule ^([^/]+)\.htm$ index.php?c=$1 [NC] RewriteRule ^([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC] now, i have to change to RewriteRule ^1/([^/]+)\.htm$ index.php?c=$1 [NC] RewriteRule ^1/([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC] RewriteRule ^2/([^/]+)\.htm$ index2.php?c=$1 [NC] RewriteRule ^2/([^/]+)\.htm/([0-9.]+)$ index2.php?c=$1&amt=$2 [NC] (the difference is adding a subdirectory) my question is how to redirect my old ones to the 1/ subdirectory? thank you

    Read the article

  • htaccess url rewrite

    - by user761396
    I used to have a rewrite rule to RewriteRule ^([^/]+)\.htm$ index.php?c=$1 [NC] RewriteRule ^([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC] Now, i have to change to RewriteRule ^1/([^/]+)\.htm$ index.php?c=$1 [NC] RewriteRule ^1/([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC] RewriteRule ^2/([^/]+)\.htm$ index2.php?c=$1 [NC] RewriteRule ^2/([^/]+)\.htm/([0-9.]+)$ index2.php?c=$1&amt=$2 [NC] (the difference is adding a subdirectory) My question is how to redirect my old ones to the 1/ subdirectory? thank you

    Read the article

  • Convert from apache rewrite to nginx

    - by Linux Intel
    I want to convert from apache rewrite modules to nginx RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) RewriteCond %{QUERY_STRING} SELECT(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} UNION(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} UPDATE(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteRule ^([^.]*)/?$ index.php [L] RewriteRule ^domain/trial/cms$ index/index.php?%{QUERY_STRING} [L] RewriteCond %{HTTP:Range} ([a-z]+) [NC] RewriteRule ([0-9_\-]+)flv$ http://www.domain.com [R,L] RewriteCond %{ENV:byte-ranges-specifier} !^$ RewriteRule ([0-9_\-]+)flv$ http://www.domain.com [R,L] RewriteCond %{HTTP_USER_AGENT} !^Mozilla/5 [NC] RewriteCond %{HTTP_USER_AGENT} !^Mozilla/4 [NC] RewriteCond %{HTTP_USER_AGENT} !^Opera [NC] RewriteRule ([0-9_\-]+)flv$ http://www.domain.com [R,L] RewriteRule ^$ index/index.php?%{QUERY_STRING} [L] RewriteCond %{SCRIPT_FILENAME} !sss.php [NC] RewriteCond %{SCRIPT_FILENAME} !m-administrator [NC] RewriteRule ^([^/^.]*)$ sss.php?encrypted=$1&%{QUERY_STRING} [L] RewriteCond %{SCRIPT_FILENAME} !sss.php [NC] RewriteCond %{SCRIPT_FILENAME} !m-administrator [NC] RewriteRule ^([^/^.]*)/([^/^.]*)$ sss.php?tab=$1&page=$2&%{QUERY_STRING} [L] RewriteCond %{SCRIPT_FILENAME} !sss.php [NC] RewriteCond %{SCRIPT_FILENAME} !m-administrator [NC] RewriteRule ^([^/^.]*)/([^/^.]*)/([^.]*)$ sss.php?tab=$1&page=$2&queryString=$3&%{QUERY_STRING} [L] RewriteCond %{SCRIPT_FILENAME} !sss.php [NC] RewriteCond %{SCRIPT_FILENAME} !security.php [NC] RewriteRule ^([^/]*)$ index/$1?%{QUERY_STRING} [L] I tried to convert it by online tools such as : http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ but it didn't convert it correctly. The conversion output is : if ($args ~ "mosConfig_[a-zA-Z_]{1,21}(=|%3D)"){ set $rule_0 1; } if ($args ~ "base64_encode.*(.*)"){ set $rule_0 1; } if ($args ~* "(<|%3C).*script.*(>|%3E)"){ set $rule_0 1; } if ($args ~ "GLOBALS(=|[|%[0-9A-Z]{0,2})"){ set $rule_0 1; } if ($args ~ "_REQUEST(=|[|%[0-9A-Z]{0,2})"){ set $rule_0 1; } if ($args ~ "SELECT(=|[|%[0-9A-Z]{0,2})"){ set $rule_0 1; } if ($args ~ "UNION(=|[|%[0-9A-Z]{0,2})"){ set $rule_0 1; } if ($args ~ "UPDATE(=|[|%[0-9A-Z]{0,2})"){ set $rule_0 1; } if ($rule_0 = "1"){ rewrite ^/([^.]*)/?$ /index.php last; } if ($rule_1 = ""){ rewrite ^/domain/trial/cms$ /index/index.php?$args last; } if ($http_range ~* "([a-z]+)"){ set $rule_2 1$rule_2; } if ($rule_2 = "1"){ rewrite /([0-9_-]+)flv$ http://www.domain.com redirect; } #ignored: condition 0 if ($rule_3 = "1"){ rewrite /([0-9_-]+)flv$ http://www.domain.com redirect; } if ($http_user_agent !~* "^Mozilla/5"){ set $rule_4 1$rule_4; } if ($http_user_agent !~* "^Mozilla/4"){ set $rule_4 2$rule_4; } if ($http_user_agent !~* "^Opera"){ set $rule_4 3$rule_4; } if ($rule_4 = "321"){ rewrite /([0-9_-]+)flv$ http://www.domain.com redirect; } if ($rule_5 = ""){ rewrite ^/$ /index/index.php?$args last; } if ($uri !~* "sss.php"){ set $rule_6 1$rule_6; } if ($uri !~* "m-administrator"){ set $rule_6 2$rule_6; } if ($rule_6 = "21"){ rewrite ^/([^/^.]*)$ /sss.php?encrypted=$1&$args last; } if ($uri !~* "sss.php"){ set $rule_7 1$rule_7; } if ($uri !~* "m-administrator"){ set $rule_7 2$rule_7; } if ($rule_7 = "21"){ rewrite ^/([^/^.]*)/([^/^.]*)$ /sss.php?tab=$1&page=$2&$args last; } if ($uri !~* "sss.php"){ set $rule_8 1$rule_8; } if ($uri !~* "m-administrator"){ set $rule_8 2$rule_8; } if ($rule_8 = "21"){ rewrite ^/([^/^.]*)/([^/^.]*)/([^.]*)$ /sss.php?tab=$1&page=$2&queryString=$3&$args last; } if ($uri !~* "sss.php"){ set $rule_9 1$rule_9; } if ($uri !~* "security.php"){ set $rule_9 2$rule_9; } if ($rule_9 = "21"){ rewrite ^/([^/]*)$ /index/$1?$args last; } Please help me with the proper conversion result for nginx in order to work perfectly.

    Read the article

  • Understanding Regular Expressions (focus on URL Rewrite)–Part 10 (Sub-Part 1 of 2)

    - by OWScott
    Regular Expressions can seem difficult to understand.  In today’s lesson I attempt to bring this down to earth and make it understandable and useful for the web administrator.  While this focuses on URL Rewrite, this lesson is useful for Visual Studio, ASP.NET development and JavaScript development also. I couldn’t keep this within 10-15 minutes so this is Part 1 of 2 on Regular Expressions. This is week 10 of a 52 week series on various web administration related tasks.  Past and future videos can be found here.

    Read the article

  • Understanding Regular Expressions (focus on URL Rewrite)–Part 11 (Sub-Part 2 of 2)

    - by OWScott
    This 2nd part (out of 2) on Regular Expressions covers the remaining tips necessary to get up to speed on a topic that at first seems daunting, but really isn’t that bad. Whether you use Regular Expressions for URL Rewrite, Visual Studio, PowerShell, programming or any other tool, these tips will allow you to understand the essentials of Regular Expressions. Be sure to watch Part 1 first. This is week 11 of a 52 week series on various web administration related tasks. Past and future videos can be found here.

    Read the article

  • .htaccess rewrite www to non-www and remove .html

    - by lester8891
    I need rewrite rules to redirect the following: http://www. to http:// /file.html to /file I've tried using a combination of these but each time it results in a redirect loop on one of the situations RewriteBase / RewriteRule ^(.*)\.html$ $1 [NC] RewriteCond %{HTTP_HOST} ^www.domain.co.uk [NC, L] RewriteRule ^(.*)$ http://domain.co.uk/$1 [R=301] I figure it's probably something to do with the flags but I don't know how to fix it. Just to be clear it needs to do all these situations: http://www.domain.co.uk to http://domain.co.uk http://www.domain.co.uk/file.html to http://domain.co.uk/file http://domain.co.uk to http://domain.co.uk http://domain.co.uk/file.html to http://domain.co.uk/file Thanks!

    Read the article

  • How to stop htaccess rewrite rule carrying over query string

    - by geoffs3310
    I am setting up some redirects. I want to redirect the following URL: /cms/index.php?cat_id=2 to the following URL: /flash-chromatography The rule I currently have is as follows: RewriteCond %{QUERY_STRING} ^cat_id=2$ [NC] RewriteRule ^cms/index\.php$ /flash-chromatography [L,R=301] This rule is almost perfect apart from it redirect the URL to the following: /flash-chromatography?cat_id=2 So you see my problem is it has kept the ?cat_id=2 part when I don't want it to. How do I stop it keeping this bit?

    Read the article

  • How can I express this nginx config as apache2 rewrite rules?

    - by codecowboy
    if (!-e $request_filename){ rewrite /iOS/(.*jpg)$ /$1 last; rewrite /iOS/(.*jpeg)$ /$1 last; rewrite /iOS/(.*png)$ /$1 last; rewrite /iOS/(.*css)$ /$1 last; rewrite /iOS/(.*js)$ /$1 last; rewrite /Android/(.*jpg)$ /$1 last; rewrite /Android/(.*jpeg)$ /$1 last; rewrite /Android/(.*png)$ /$1 last; rewrite /Android/(.*css)$ /$1 last; rewrite /Android/(.*js)$ /$1 last; rewrite ^/(.*)$ /?route=$1 last; } There are some vanity URLs e.g. mysite.com/yourdetails which are handled internally by a router class (its a PHP app with index.php as the entry point) and they seem to work fine on nginx but not Apache :-/ I tried this but the vanity URLs are not working RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L] I'd like to rule out Apache config first before I get too deep into the code.

    Read the article

  • rewrite all .html extension and remove index in Nginx

    - by Pardoner
    How would I remove all .html extensions as well as any occurrences of index.html from a url string in Nginx http://www.mysite/index.html to http://www.mysite http://www.mysite/articles/index.html to http://www.mysite/articles http://www.mysite/contact.html to http://www.mysite/contact http://www.mysite/foo/bar/index.html to http://www.mysite/foo/bar EDIT: Here is my conf file: server { listen 80; server_name staging.mysite.com; root /var/www/staging.mysite.com; index index.html index.htm; access_log /var/log/nginx/staging.mysite.com.log spiegle; #error_page 404 /404.html; #error_page 500 503 /500.html; rewrite ^(.*/)index\.html$ $1; rewrite ^(/.+)\.html$ $1; rewrite ^(.*/)index\.html$ $scheme://$host$1 permanent; rewrite ^(/.+)\.html$ $scheme://$host$1 permanent; location / { rewrite ^/about-us /about permanent rewrite ^/contact-us /contact permanent; try_files $uri.html $uri/ /index.html; } }

    Read the article

  • Help with URL Rewrite

    - by bodesam
    This is the first time i'm doing this and have been doing some research on it. I have a page that selects some info from a database and displays it with a link to a second page that uses the result to query the database, something like this: $sel=mysql_query("select id, title from thetable "); while($row=mysql_fetch_array($sel)) { $id=$row['id']; $title=$row['title']; echo "<a href='more.php?id=$id'>$title</a>"; } The issue is, in the more.php page, instead of more.php?id=5 to show in the address bar, I want something like more/title Secondly, as it obtains in most sites, I want the link on the referring page to show this friendly url on mouse hover not the more.php?id=5 And I notice in most sites some words like 'a', 'and', 'the' etc are usually removed from the url title(even if there originally), moreover how does one handle the situation where more than one record have the same title. How does one go about achieving this url rewrite with htaccess or whatever method is used. Thanks.

    Read the article

  • mod rewrite escape chars

    - by Eugene
    hi, simple question www.site.com/page/3 to be www.site.com/page--3 so that i can read the pagenumber and page This is what i got but i dont know how to use the '--' and slash together instead. RewriteRule ^/?([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ index.php?page=$1&subpage=$2 Any help appreciated

    Read the article

  • Apache Mod Rewrite question

    - by ezlem
    I am not really familiar with apache modrewrite I have url parameters such as {domain}/index.php?blog=5 i simply want to make it {domain}/home.php?client=5 Is it a task as simple as it sounds and can anyone help ?

    Read the article

  • Url rewrite subfolder to root and forbid accessing subfolder

    - by Alessandro Pezzato
    I have drupal installed in a subfolder drupal, but I want to access pages as it is in root folder: http://www.example.com instead of http://www.example.com/drupal I'm able to have this working, but it's also working with url containing subfolder, so I have http://www.example.com and a clone site in http://www.example.com/drupal What is the rule to forbid access to subfolder? I want all url starting with http://www.example.com/drupal being forbidden. This is .htaccess in / directory: Options -Indexes Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] RewriteRule ^(.*+)$ drupal/$1 [L,QSA] </IfModule> And this is drupal .htaccess in /drupal/ directory: Options -Indexes Options +FollowSymLinks ErrorDocument 404 index.php DirectoryIndex index.php index.html index.htm # Override PHP settings that cannot be changed at runtime. See # sites/default/default.settings.php and drupal_initialize_variables() in # includes/bootstrap.inc for settings that can be changed at runtime. # PHP 5, Apache 1 and 2. <IfModule mod_php5.c> php_flag magic_quotes_gpc off php_flag magic_quotes_sybase off php_flag register_globals off php_flag session.auto_start off php_value mbstring.http_input pass php_value mbstring.http_output pass php_flag mbstring.encoding_translation off </IfModule> # Requires mod_expires to be enabled. <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ExpiresDefault A1209600 <FilesMatch \.php$> # Do not allow PHP scripts to be cached unless they explicitly send cache # headers themselves. Otherwise all scripts would have to overwrite the # headers set by mod_expires if they want another caching behavior. This may # fail if an error occurs early in the bootstrap process, and it may cause # problems if a non-Drupal PHP file is installed in a subdirectory. ExpiresActive Off </FilesMatch> </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on # Block access to "hidden" directories whose names begin with a period. This # includes directories used by version control systems such as Subversion or # Git to store control files. Files whose names begin with a period, as well # as the control files used by CVS, are protected by the FilesMatch directive # above. RewriteRule "(^|/)\." - [F] # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # uncomment the following: # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment the following: RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] RewriteBase /drupal # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico #RewriteRule ^ index.php [L] RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] # Rules to correctly serve gzip compressed CSS and JS files. # Requires both mod_rewrite and mod_headers to be enabled. <IfModule mod_headers.c> # Serve gzip compressed CSS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.css $1\.css\.gz [QSA] # Serve gzip compressed JS files if they exist and the client accepts gzip. RewriteCond %{HTTP:Accept-encoding} gzip RewriteCond %{REQUEST_FILENAME}\.gz -s RewriteRule ^(.*)\.js $1\.js\.gz [QSA] # Serve correct content types, and prevent mod_deflate double gzip. RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1] RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1] <FilesMatch "(\.js\.gz|\.css\.gz)$"> # Serve correct encoding type. Header append Content-Encoding gzip # Force proxies to cache gzipped & non-gzipped css/js files separately. Header append Vary Accept-Encoding </FilesMatch> </IfModule> </IfModule>

    Read the article

  • lighttpd: weird behavior on multiple rewrite rule matches

    - by netmikey
    I have a 20-rewrite.conf for my php application looking like this: $HTTP["host"] =~ "www.mydomain.com" { url.rewrite-once += ( "^/(img|css)/.*" => "$0", ".*" => "/my_app.php" ) } I want to be able to put the webserver in kind of a "maintenance" mode while I update my application from scm. To do this, my idea was to enable an additional rewrite configuration file before this one. The 16-rewrite-maintenance.conf file looks like this: url.rewrite-once += ( "^/(img|css)/.*" => "$0", ".*" => "/maintenance_app.php" ) Now, on the maintenance page, I have a logo that doesn't get loaded. I get a 404 error. Lighttpd debug says the following: 2012-12-13 20:28:06: (response.c.300) -- splitting Request-URI 2012-12-13 20:28:06: (response.c.301) Request-URI : /img/content/logo.png 2012-12-13 20:28:06: (response.c.302) URI-scheme : http 2012-12-13 20:28:06: (response.c.303) URI-authority: localhost 2012-12-13 20:28:06: (response.c.304) URI-path : /img/content/logo.png 2012-12-13 20:28:06: (response.c.305) URI-query : 2012-12-13 20:28:06: (response.c.300) -- splitting Request-URI 2012-12-13 20:28:06: (response.c.301) Request-URI : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.302) URI-scheme : http 2012-12-13 20:28:06: (response.c.303) URI-authority: localhost 2012-12-13 20:28:06: (response.c.304) URI-path : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.305) URI-query : 2012-12-13 20:28:06: (response.c.349) -- sanatising URI 2012-12-13 20:28:06: (response.c.350) URI-path : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (mod_access.c.135) -- mod_access_uri_handler called 2012-12-13 20:28:06: (response.c.470) -- before doc_root 2012-12-13 20:28:06: (response.c.471) Doc-Root : /www 2012-12-13 20:28:06: (response.c.472) Rel-Path : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.473) Path : 2012-12-13 20:28:06: (response.c.521) -- after doc_root 2012-12-13 20:28:06: (response.c.522) Doc-Root : /www 2012-12-13 20:28:06: (response.c.523) Rel-Path : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.524) Path : /www/img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.541) -- logical -> physical 2012-12-13 20:28:06: (response.c.542) Doc-Root : /www 2012-12-13 20:28:06: (response.c.543) Rel-Path : /img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.544) Path : /www/img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.561) -- handling physical path 2012-12-13 20:28:06: (response.c.562) Path : /www/img/content/logo.png, /img/content/logo.png 2012-12-13 20:28:06: (response.c.618) -- file not found 2012-12-13 20:28:06: (response.c.619) Path : /www/img/content/logo.png, /img/content/logo.png Any clue on why lighttpd matches both rules (from my application rewrite config and from my maintenance rewrite config) and concatenates them with a comma - that doesn't seem to make any sense?! Shouldn't it stop after the first match with rewrite-once?

    Read the article

  • Nginx https rewrite turns POST to GET

    - by x7311
    My proxy server runs on ip A and this is how people access my web service. The nginx configuration will redirect to a virtual machine on ip B. For the proxy server on IP A, I have this in my sites-available server { listen 443; ssl on; ssl_certificate nginx.pem; ssl_certificate_key nginx.key; client_max_body_size 200M; server_name localhost 127.0.0.1; server_name_in_redirect off; location / { proxy_pass http://10.10.0.59:80; proxy_redirect http://10.10.0.59:80/ /; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 80; rewrite ^(.*) https://$http_host$1 permanent; server_name localhost 127.0.0.1; server_name_in_redirect off; location / { proxy_pass http://10.10.0.59:80; proxy_redirect http://10.10.0.59:80/ /; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } The proxy_redirect was taken from how do I get nginx to forward HTTP POST requests via rewrite? Everything that hits the public IP will hit 443 because of the rewrite. Internally, we are forwarding to 80 on the virtual machine. But when I run a python script such as the one below to test our configuration import requests data = {'username': '....', 'password': '.....'} url = 'http://IP_A/api/service/signup' res = requests.post(url, data=data, verify=False) print res print res.json print res.status_code print res.headers I am getting a 405 Method Not Allowed. In nginx we found that when it hit the internal server, the internal nginx was getting a GET request, even though in the original header we did a POST (this was shown in the Python script). So it seems like rewrite has problem. Any idea how to fix this? When I commented out the rewrite, it hits 80 for sure, and it went through. Since rewrite was able to talk to our internal server, so rewrite itself has no issue. It's just the rewrite dropped POST to GET. Thank you! (This will also be asked on Nginx forum because this is a critical blocker...)

    Read the article

  • Convert apache rewrite rules to nginx

    - by Shiyu Sekam
    I want to migrate an Apache setup to Nginx, but I can't get the rewrite rules working in Nginx. I had a look on the official nginx documentation, but still some trouble converting it. http://nginx.org/en/docs/http/converting_rewrite_rules.html I've used http://winginx.com/en/htaccess to convert my rules, but this just works partly. The / part looks okay, the /library part as well, but the /public part doesn't work at all. Apache part: ServerAdmin webmaster@localhost DocumentRoot /srv/www/Web Order allow,deny Allow from all RewriteEngine On RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L] Order Deny,Allow Deny from all RewriteEngine On RewriteCond %{QUERY_STRING} ^pid=([0-9]*)$ RewriteRule ^places(.*)$ index.php?url=places/view/%1 [PT,L] # Extract search query in /search?q={query}&l={location} RewriteCond %{QUERY_STRING} ^q=(.*)&l=(.*)$ RewriteRule ^(.*)$ index.php?url=search/index/%1/%2 [PT,L] # Extract search query in /search?q={query} RewriteCond %{QUERY_STRING} ^q=(.*)$ RewriteRule ^(.*)$ index.php?url=search/index/%1 [PT,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php?url=$1 [PT,L] Order deny,allow deny from all ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn AddHandler php5-fcgi .php Action php5-fcgi /php5-fcgi Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization CustomLog ${APACHE_LOG_DIR}/access.log combined Nginx config: server { #listen 80; ## listen for ipv4; this line is default and implied root /srv/www/Web; index index.html index.php; server_name localhost; location / { rewrite ^/$ /public/ break; rewrite ^(.*)$ /public/$1 break; } location /library { deny all; } location /public { if ($query_string ~ "^pid=([0-9]*)$"){ rewrite ^/places(.*)$ /index.php?url=places/view/%1 break; } if ($query_string ~ "^q=(.*)&l=(.*)$"){ rewrite ^(.*)$ /index.php?url=search/index/%1/%2 break; } if ($query_string ~ "^q=(.*)$"){ rewrite ^(.*)$ /index.php?url=search/index/%1 break; } if (!-e $request_filename){ rewrite ^(.*)$ /index.php?url=$1 break; } } location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } I haven't written the original ruleset, so I've a hard time converting it. Would you mind giving me a hint how to do it easily or can you help me to convert it, please? I really want to switch over to php5-fpm and nginx :) Thanks

    Read the article

  • Trying to install realtek drivers for ASUS USB-N13, encountering "Compile make driver error: 2"

    - by limp_chimp
    I'm trying to put an ASUS USB-N13 wireless adapter in my desktop running Ubuntu 12.04. The details of my problem are identical to the one described in this question: Connecting Asus USB-N13 Wireless Adapter. As such, I'm running through the exact steps laid out in the top-rated answer to that question. All was going well until I get to building the drivers. sudo bash install.sh produces the following output: ################################################## Realtek Wi-Fi driver Auto installation script Novembor, 21 2011 v1.1.0 ################################################## Decompress the driver source tar ball: rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405.tar.gz rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/autoconf_rtl8712_usb_linux.h rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/clean rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl8712_cmd.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/config rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/crypto/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/crypto/rtl871x_security.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/debug/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/debug/rtl871x_debug.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/eeprom/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/eeprom/rtl871x_eeprom.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/efuse/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/efuse/rtl8712_efuse.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/hal/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/hal/rtl8712/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/hal/rtl8712/hal_init.c [...truncated for space...] rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ioctl/rtl871x_ioctl_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ioctl/rtl871x_ioctl_query.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ioctl/rtl871x_ioctl_rtl.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/ioctl/rtl871x_ioctl_set.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/Kconfig rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/led/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/led/rtl8712_led.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/Makefile rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mlme/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mlme/ieee80211.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mlme/rtl871x_mlme.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mp/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mp/rtl871x_mp.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/mp/rtl871x_mp_ioctl.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/cmd_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/ioctl_cfg80211.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/io_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/mlme_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/recv_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/rtw_android.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_dep/linux/xmit_linux.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_intf/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_intf/linux/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_intf/linux/os_intfs.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_intf/linux/usb_intf.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/os_intf/osdep_service.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/pwrctrl/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/pwrctrl/rtl871x_pwrctrl.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/recv/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/recv/rtl8712_recv.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/recv/rtl871x_recv.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/rf/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/rf/rtl8712_rf.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/rf/rtl871x_rf.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/runwpa rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/sta_mgt/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/sta_mgt/rtl871x_sta_mgt.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/wlan0dhcp rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/wpa1.conf rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/xmit/ rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/xmit/rtl8712_xmit.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/xmit/rtl871x_xmit.c rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405 Authentication requested [root] for make clean: rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~ rm .tmp_versions -fr ; rm Module.symvers -fr cd cmd ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd crypto ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd debug ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd eeprom ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd hal/rtl8712 ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd io ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd ioctl ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd mlme ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd mp ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_intf ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_intf/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd pwrctrl ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd recv ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd rf ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd sta_mgt ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd xmit; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd efuse; rm -fr *.mod.c *.mod *.o .*.cmd *.ko Authentication requested [root] for make driver: make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.2.0-23-generic/build M=/home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405 modules make[1]: Entering directory `/usr/src/linux-headers-3.2.0-23-generic' CC [M] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.o In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:23:0: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/osdep_service.h: In function ‘_init_timer’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/osdep_service.h:151:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_ht.h:25:0, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/drv_types.h:67, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:24: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h: In function ‘get_da’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:350:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:350:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:353:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:353:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:356:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:356:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:359:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:359:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h: In function ‘get_sa’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:374:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:374:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:377:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:377:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:380:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:380:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:383:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:383:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h: In function ‘get_hdr_bssid’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:397:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:397:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:400:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:400:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:403:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/wifi.h:403:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/drv_types.h:70:0, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:24: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_cmd.h: At top level: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_cmd.h:107:25: error: field ‘event_tasklet’ has incomplete type In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/drv_types.h:72:0, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:24: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_xmit.h:355:24: error: field ‘xmit_tasklet’ has incomplete type In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/drv_types.h:73:0, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:24: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_recv.h:205:24: error: field ‘recv_tasklet’ has incomplete type In file included from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/drv_types.h:73:0, from /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:24: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_recv.h: In function ‘rxmem_to_recvframe’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_recv.h:435:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/include/rtl871x_recv.h:435:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c: In function ‘_init_cmd_priv’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:93:75: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:101:60: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c: In function ‘_init_evt_priv’: /home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.c:135:59: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] make[2]: *** [/home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/cmd/rtl871x_cmd.o] Error 1 make[1]: *** [_module_/home/thinkpad20/Downloads/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405/driver/rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20120405] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-23-generic' make: *** [modules] Error 2 ################################################## Compile make driver error: 2 Please check error Mesg ################################################## I'm not a superuser, only a hobbyist. I really just want this to work ~.~ so I can get on with my life. Sigh. Anyway, grumbling aside, I hope people can help.

    Read the article

  • Block With Given ID Does Not Exist - Minecraft Mod

    - by inixsoftware
    I have tried to make my own Minecraft Block using Forge, but for some reason, when I use /give Playerxxx 1000 1 the game says, There is no block with id '1000' My Block Code: package net.minecraft.blockr; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class Basalt extends Block { public Basalt(int par1, Material par2Material) { super(par1, par2Material); this.setCreativeTab(CreativeTabs.tabBlock); } } Mod code: package net.minecraft.blockr; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @Mod(modid="blockr", name="Blockr Mod", version="PreAlpha v0.0.1") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class BlockrMod { public static Block basalt; @Init public void load() { basalt = new Basalt(1000, Material.ground).setUnlocalizedName("basalt"); GameRegistry.registerBlock(basalt, basalt.getUnlocalizedName()); LanguageRegistry.addName(basalt, "Basalt Block"); } public String getVersion() { return "0.0.1"; } } What exactly is going wrong? My package is blockr (as my mod is called blockr) I know my mod was loaded as I see in Forge under Mods I see my mod

    Read the article

  • Rewrite rules doesn’t work apache 1.3

    - by Sander Versluys
    I'm using a couple of rewrite directives that always works before on apache2 but now i'm trying new a shared hosting and the rewrite rules do not seem to get applied. I've reduced the .htaccess files to the following essential rules: RewriteEngine On Rewritebase /demo/ RewriteRule ^(.*)$ index.php/$1 [L] As you can see, i want to rewrite every request to my index.php file in the demo folder from root. So everything like http://www.example.com/demo/albums/show/1 should be processed by http://www.example.com/demo/index.php for a standard MVC setup. (I'm using CodeIgniter btw) The directives above results in a 500 error, so i thought maybe because of some possible syntax differences between 1.3 and 2.x. After some trail and error editing, i've found the rewrite rule itself to be at fault but i really don't understand why. Any ideas to why my rewrite rule doesn't work? it did before on lots of different servers. Suggestions how to fix it? Note: mod_rewrite does work, i've written a small test to be sure

    Read the article

  • How would you rewrite/refactor this ?

    - by frostings
    Old application that is used by 50-60.000 paying customers. Company is several hundred people big. Application has a lot of business critical code (30% of all code) written in classic asp. Application has a lot more .net code. Application has a COM+ bridge for enabling asp to "talk" to .net Organization lacks some/a lot knowledge on what is causing the 10-20% server-reset per day (might be due to COM+ ?) There is no red line through the application; no architecture, no real patterns etc. The application has been like this for at least 5 years. The asp code base is increasing, slowly but certainly. I have read refactoring stories and I have knowledge on why you some of the times should not re-write a system. I would love for the old asp code to vanish as well as the COM+ component. But the pain is that no one really knows what is going on inside the asp classic code and the attitude inside all the teams are "this is just how it is". Down the line, this causes a lot of other issues like recruiting, dev effeciency, business needs that cannot be met, scale etc. With these little facts, does that justify a re-write of the asp code and the removal of the COM+ component ? How would you go about it ?

    Read the article

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