search for: rewriterule

Displaying 20 results from an estimated 276 matches for "rewriterule".

2006 Jul 20
5
Apache 2.2, Mongrel and #caches_page
...just enabled page caching in my Rails app, and am now looking at making Apache serve the cached files instead of calling into Rails. I know Mongrel is able to serve cached files if it finds them, but I''d like Apache to do it. Looking at .htaccess, there is this section: RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] The last line MUST change because I am proxying. What should it change to is what I''m wondering. I tried: RewriteRule ^(.*)$ balancer://smrty/ [QSA,L] b...
2006 Oct 03
4
Apache Re-Write and Directories
...t does not work as it gets directed to the cluster. How can I change my rewrite rules to have both of the above URLs be served by the static resource via Apache, not by Mongrel? Rewrite rules: RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /maintenance.html [L] # Rewrite index to check for static index.html RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached pages with .html extentions RewriteRule ^([^.]+)$ $1.html [QSA] # All dynamic requests get sent to the cluster RewriteCond %{DOCUMENT_ROOT}/%{R...
2009 Jun 17
2
Using a cgi perl program?
...tcgi-script .fcgi AddHandler cgi-script .pl .cgi Options +FollowSymLinks +ExecCGI # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: # RewriteRule ^(.*)$ dispatch.cgi [QSA,L] RewriteEngine On # If your Rails app...
2017 Feb 23
2
help with RewriteRule regexp
I tried: RewriteRule ^webmail\.|/webmail https://%{SERVER_NAME}%{REQUEST_URI} [L,R] But that does not rewrite for http://webmail.domain On 02/22/2017 06:41 PM, Robert Moskowitz wrote: > Seems I left off one point in this message. > > This is to refine these rules in my Apache server. > > Rewr...
2017 Feb 23
1
help with RewriteRule regexp
...ch isn't obvious to me (unless Apache regex is different from grep). ----- Original Message ----- From: "Leroy Tennison" <leroy at datavoiceint.com> To: "centos" <centos at centos.org> Sent: Thursday, February 23, 2017 10:15:54 AM Subject: Re: [CentOS] help with RewriteRule regexp And it won't if 'http://webmail.domain' is the actual text, the ^ says "at the start of the line" (in other words, 'webmail\.' must start in character position 1). Choices: Remove the caret and accept the consequence that all references to "webmail\.&quot...
2017 Feb 22
2
help with RewriteRule regexp
My regexp skills are somewhere infinitesimally close to zero. I have never really 'gotten' them. That said, I have spent a couple hours already search for help to write a rewriterule that works on a string in the URL. In particular I want success if either of the following were provided: webmail.domain (e.g. webmail.foo.com) server/webmail (e.g. www.foo.com/webmail) And I have not found anything like this, nor do I know even close enough of regexp to recognize something li...
2009 May 21
2
[PATCH server] Fix anyterm for multinode support
...(+), 3 deletions(-) diff --git a/conf/ovirt-server.conf b/conf/ovirt-server.conf index 6e5eea9..62f2dd8 100644 --- a/conf/ovirt-server.conf +++ b/conf/ovirt-server.conf @@ -23,8 +23,10 @@ NameVirtualHost AdminNetIpAddress:80 RewriteEngine On RewriteMap vmnodes prg:/usr/bin/ovirt-vm2node - RewriteRule ^/terminal/(.*\.(js|css|gif)|proxy/anyterm-module)$ http://${vmnodes:anyterm}:81/$1 [P] - RewriteRule ^/terminal/(.*)$ http://${vmnodes:$1}:81/anyterm.html?param=$1 [P,NE] + RewriteRule ^/terminal/(.*)/(.*\.(js|css|gif))$ http://${vmnodes:anyterm}:81/$2 [P] + RewriteRule ^/terminal/(.*)/proxy/an...
2006 Jul 27
3
[somewhat OT] Apache config for Rails + ColdFusion + PHP
Our group has several web apps developed in ColdFusion, PHP, and Rails. The ColdFusion and PHP apps are on an older server, and the Rails apps on a new server. Ideally, we''d like them all to share the same server. Our current setup for the Rails server is Apache2.2 with mod_proxy_balancer and mongrel_cluster. We''d like to have specific directories be processed and served by
2006 Aug 13
3
Rewrite problem or routing issue?
...er fcgid-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On # If your Rails applic...
2006 Aug 13
1
Rewrite problem?
...r fcgid-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On # If your Rails applic...
2008 Oct 06
8
.htaccess rewrite
can someone help me with an .htaccess rewrite? i''m trying to convert all requests to "/?spot=8888" to be "/locations/ 888". thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2017 Feb 23
0
help with RewriteRule regexp
...that it will accept the construct I supplied, hopefully someone else can speak to that. ----- Original Message ----- From: "rgm" <rgm at htt-consult.com> To: "centos" <centos at centos.org> Sent: Thursday, February 23, 2017 9:43:59 AM Subject: Re: [CentOS] help with RewriteRule regexp I tried: RewriteRule ^webmail\.|/webmail https://%{SERVER_NAME}%{REQUEST_URI} [L,R] But that does not rewrite for http://webmail.domain On 02/22/2017 06:41 PM, Robert Moskowitz wrote: > Seems I left off one point in this message. > > This is to refine these rules in m...
2008 Jun 16
3
Apache rewrites with mongrel
...ias /javascripts /var/www/rails/myApp/current/public/javascripts RewriteLog /var/log/apache2/rails-rewrite.log And last not lease my .htaccess in public AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI AddDefaultCharset UTF-8 RewriteEngine On RewriteRule ^01,([0-9]*).html$ balancer://mongrel_cluster/shop/event/$1 [P,QSA,L] RewriteRule ^01,([a-zA-Z0-9]*),([0-9]+).html$ balancer://mongrel_cluster/shop/search/$2?startnumber=$1 [P,L] RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(....
2006 May 26
1
RewriteRule to strip www. ?
I''m trying to add a RewriteRule to my .htaccess to remove the www. prefix from requests. The following works on its own: RewriteCond %{HTTP_HOST} www.mysite.com RewriteRule (.*) http://mysite.com/$1 But it blows up when I try to add it to my .htaccess file. I''ve tried moving it around, before and after the various Ra...
2007 Jun 03
6
mongrel cluster w/ apache
...r allow,deny Allow from all </Directory> RewriteEngine On RewriteLog logs/weposs_rewrite_log RewriteLogLevel 9 # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f Rewr...
2005 Oct 10
1
Need help from Apache mod_rewrite crew !
...s something wrong with the rewrite conditions. According to Apache''s docs, the default is 10 redirects, and I would guess that two are needed to get a Productized Rails app going. Here''s the relevant part of .htaccess (reformatted for readability): ----------- RewriteEngine On RewriteRule ^$ index.html [QSA] # Hack to fix mod_rewrite bug: we catch the incoming uri as an environment variable ''DOC'' RewriteRule "(.*)" "$1" [env=DOC:$1] # If the requested file does not exist in SITE_ROOT/public... RewriteCond %{DOCUMENT_ROOT}%{ENV:DOC} !-f # ......
2006 Dec 21
4
my apache 2.2 conf
...gs/int.example.com/error.log [...] ## Application Server # APP1 <Proxy balancer://app1> BalancerMember http://127.0.0.1:11001 </Proxy> Alias /app1 /production/app1/public <Directory /production/app1/public> Allow from .example.com RewriteEngine on RewriteRule ^/?$ balancer://app1%{REQUEST_URI} [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . balancer://app1%{REQUEST_URI} [P,L] </Directory> # End APP1 # APP2 <Proxy balancer://app2> BalancerMember http://127.0.0.1:11010 </Proxy> Alias /app2 /dev/app2/publ...
2007 Jun 03
3
mongrel cluster w/ apache
...e Order allow,deny Allow from all </Directory> RewriteEngine On RewriteLog logs/weposs_rewrite_log RewriteLogLevel 9 # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule...
2006 May 11
5
Problem running application in cpanel
Hi, I installed rails following the instruccions from http://wiki.rubyonrails.com/rails/pages/HowtoInstallAndRunRubyOnRailsOnCpanel but when i try see the application i have a 500 Internal Server Error, this is only with apache because i can run with webrick Please i am desesperate -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Nov 22
4
reg vhost in apache
...AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine On # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FI...