Displaying 20 results from an estimated 193 matches for "rewritecond".
2009 Jun 17
2
Using a cgi perl program?
...le:
# General Apache options
AddHandler fastcgi-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 [...
2011 May 08
5
Am I being to paranoid?
...n/: 1 Time(s)
//webadmin/: 1 Time(s)
//webdb/: 1 Time(s)
//websql/: 1 Time(s)
//wp-content/plugins/phpMyAdmin/: 1 Time(s)
//wp-content/plugins/wp-phpmyadmin/: 1 Time(s)
//xampp/phpmyadmin/: 1 Time(s)
So I turned on Apache ReWrite and I created a file and I put in rules like: (just a small subset)
RewriteCond %{REQUEST_URI} ^/php(.*) [NC,OR]
RewriteCond %{REQUEST_URI} ^/phpmy(.*) [NC,OR]
RewriteCond %{REQUEST_URI} ^/phpma [NC,OR]
RewriteCond %{REQUEST_URI} ^/phpmyadmin [NC,OR]
RewriteCond %{REQUEST_URI} ^/phpadmin [NC,OR]
RewriteCond %{REQUEST_URI} ^/phpgadmin [NC,OR]
RewriteCond %{REQUEST_URI} ^/phppga...
2006 Oct 03
4
Apache Re-Write and Directories
...://www.domain.com/static/ - then it works
If I request it as:
http://www.domain.com/static - then it 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 ^([^....
2006 Dec 11
2
Does mongrel look at the Rails page cache?
Hi all. I''m trying to skip the Rails page cache if the user is logged
in:
---
# Rewrite index to check for static
RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$
RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteCond %{HTTP_COOKIE} !^.*logged_in=yes.*$
RewriteRule ^([^.]+)$ $1.html [QSA]
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
Rew...
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
2007 Feb 22
4
Modifying Apache Conf To Block Leachers
...e has any suggestions on getting this to work... I would expect
this to send the user to error.html if the referrer is not the site
in question but nothing at all happens...
Any suggestions appreciated, this stuff drives me batty.
URL: http://www.mysite.com/audio_file/the_audio_file/file.mp3
RewriteCond %{REQUEST_FILENAME} .*mp3$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !mysite\.com [NC]
RewriteCond %{HTTP_REFERER} !friendlysite\.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /error.html
RewriteCond %{...
2016 May 28
5
CentOS 6.8 Apache-2.2.15-53 re-write question
I was wondering if somebody could help me with an Apache re-write rule. Apparently CentOS 6.8 is running apache-2.2.15-53. I am trying
to redirect all pages except for two pages. The apache rewrite directives in the httpd config are:
RewriteEngine on
RewriteCond %{REQUEST_URI}!^/test/
RewriteCond %{REQUEST_URI}!^/my-folder/
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
These commands should cause all requests to get re-directed to www.newdomain.com except for those with a /test or /my-folder on the end of the
URL. However when I place these comma...
2005 May 13
0
Apache config for Squirrelmail?
...Allow from all
</Directory>
RewriteEngine on
RewriteLog "/var/log/httpd/rewrite_log"
RewriteLogLevel 0
# AIDE-MEMOIRE
# Arguments $1, $2 etc. refer to () matches in the
# CURRENT RewriteRule line.
# Arguments %1, %2 etc. refer to () matches in the
# LAST matched RewriteCond.
# Do not process established ssl squirrelmail sessions
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/webmail(/?|/.*)$
RewriteRule (^.*$) - [L,R]
# Rewrite short form URLs whether SSL or not for forms
# webmail.anything.dom and www.webmail.anything.dom
RewriteCond %{HTTP_...
2006 Aug 30
3
Ruby+Apache2.2+ProxyLoadBalance ...... +PHP??
Hi,
I just realice that I can''t run php code anymore once I installed my dear
mongrels (under an Apache Proxy Balancer).
I''m just trying to run the clasic phpinfo() in the following file
/var/rubyapp/public/phpinfo.php ... but instead of being executed the code
is being displayed as plain text ... This is the ouput :))
<?PHP phpinfo(); ?>
anyone can give a
2007 Jul 17
3
.htaccess problems..... Using Drupal
...mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the prefix www. you
# can use one of the following settings to force user to use only one
option:
#
# If you want the site to be accessed WITH the www. only, adapt and
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
# and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=30...
2007 Mar 29
0
Resolved problem with Apache Load Balancer Manager
Had to make a couple of changes to the config from the mongrel site to get
the load balancer manager working:
changed
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
to
# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/balancer
RewriteRule ^/(.*)$ balancer://mong...
2005 Oct 10
1
Need help from Apache mod_rewrite crew !
...bility):
-----------
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
# ... then split its full path up in to manageable pieces ...
RewriteCond %{REQUEST_FILENAME} ^(.*)/sites/.+$
# ... and check to see if the file exists in the RAILS_ROOT/public
# folder...
RewriteCond %1/public/%{ENV:DOC} -f
# ... if so, rewrite our requested file...
2007 Jun 03
6
mongrel cluster w/ apache
...quot;/usr/local/www/weposs/current/public" >
Options FollowSymLinks
AllowOverride None
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...
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
2008 Jan 23
7
Apache, Mongrel, Authentication
...uthName "Restricted"
AuthBasicProvider file
AuthUserFile /www/mysite/users/userdb
Require valid-user
</Directory>
RewriteEngine On
# Check for maintenance file and redirect all requests
# ( this is for use with Capistrano''s disable_web task )
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]...
2007 Jun 03
3
mongrel cluster w/ apache
...irectory "/usr/local/www/weposs/current/public" >
Options FollowSymLinks
AllowOverride None
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]
# R...
2017 Feb 23
2
help with RewriteRule regexp
...Rule ^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.
>
> RewriteCond %{SERVER_PORT} !^443$
> RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
>
> I only want the rewrite if the URL includes webmail as I indicate below.
>
> I have found that now the RewriteCond is 'recommended' to be changed to:
>
> RewriteCon...
2006 Jul 24
7
Apache server-status?auto in rails
Just want to check the status of Apache monitor. but Apache
server-status?auto can not be explained as normal URL in rails.
For Http://localhost/server-status?auto, rails always regard
server-status as one controller/method. It prompts errot: Recognition
failed for "/server-status"
Therefore, can not get the status info of Apache monitor. Pls expert
help me!!! Thanks in advance.
2007 Jul 31
2
Deploying with Merb
After a half day''s work I''ve created a Merb app to handle file uploads
for a Rails app.
In my dev environment, I changed the views in the Rails app to point
to Merb on port 4000.
But now I''m stuck trying to figure out how to deploy my new Merb app
on a production server.
Looks like originally this was handled with a rewrite rule
2008 May 09
2
Apache Redirects...
I'm trying to require SSL for drupal login and admin pages and it seems
that this should work but it doesn't redirect if added to httpd.conf or
to .htaccess (I've tried both)
RewriteCond %{REQUEST_URI} ^/(user|admin)
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [L,R]
Shouldn't this be enough so that the URL...(googling suggests that it
is)
http://cms.tobyhouse.com/user/login
is automatically redirected to
https://cms.tobyhouse.com/user/login
?
Craig