Displaying 20 results from an estimated 239 matches for "request_uri".
2011 May 08
5
Am I being to paranoid?
...//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} ^/phppgadmin [NC,OR]
R...
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a
test that sees if a controller redirects to the correct place and
preserves the query string.
Here?s the code:
class LoginRedirectTest < ActionController::IntegrationTest
def test_non_admin_auth
request_uri = "/datafeed/event/report?blah=blah"
get(request_uri)
follow_redirect!
assert_response :success
status = post("/login/authenticate", :login_info => {:user_name =>
"blah", :password => "blah"})
follow_redirect!
assert_re...
2009 Jun 17
2
Using a cgi perl program?
...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 [QSA,L]
Rewrite...
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 commands into the t...
2006 Dec 21
4
my apache 2.2 conf
.....]
## 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/public
<Directory /dev/app2/publi...
2008 Sep 16
0
POST parameters incorrectly appended to REQUEST_URI
My rspec controller tests are appending POST params to the request_uri
as though they are GET variables.
So this line:
post :create, :foo => ''bar''
Generates a request_uri that looks like this:
my_restful_controller?foo=bar
However when performing the same action from the actual application, the
params are not appended to the request_uri (as e...
2005 May 23
16
Success - Rails, FastCGI, and IIS / Windows Server
About 17:00 localtime I managed to get fastcgi,
Rails and IIS all happy together.
Upon success I ripped off my clothes and ran through
the village yelling "The future is now!". A PDP-11
geezer stuck his head out a window and said "The future
isn''t what it used to be and keep yer shirt on".
Modifications were required to dispatch.fcgi and request.rb.
The following
2006 Feb 05
2
request.request_uri in production environment?
Hi,
What''s the problem with this line?
<%= ''height="750" valign="top"'' if request.request_uri =~ /survey_result/i %>
No problem with development environment but when uploading to server I
get application error.
And is there a better way to do this?
Thanks
2007 Dec 23
1
Rails: possible routing discrepancy
...ge?, which is used by link_to_unless_current. Here''s that
method:
def current_page?(options)
url_string = CGI.escapeHTML(url_for(options))
request = @controller.request
if url_string =~ /^\w+:\/\//
url_string == "#{request.protocol}#{request.host_with_port}#
{request.request_uri}"
else
url_string == request.request_uri
end
end
So here''s the rub: When I''m running current_page? with script/server,
I get "/writing" for url_string and "/writing" for
@controller.request.request_uri -- meaning current_page? works
corre...
2006 Jul 17
0
Difference between mongrel and webrick handling request.request_uri
If I do this GET request:
GET /comments/new?description_id=1 HTTP/1.1
what ends up in request.request_uri is different for mongrel and webrick:
Mongrel: "/comments/new"
Webrick: "/comments/new?description_id=1"
The mongrel behaviour breaks my app because I''m storing the uri to
redirect to it later. Mongrel even logs the request as:
127.0.0.1 - [Mon, 17 Jul 2006 13:53:40...
2008 Nov 05
3
Problems w/ before_filter getting ignored
Hello,
I''m setting up an authentication module that will be called from
application.rb. I want to save a rrequest.request_uri into a
session to be used as a place holder that
will take users back to the page they were on before they logged in.
I''m trying to call the store_location method for all methods EXCEPT
login by putting login in an except before filter.
For some reason, when I login the last request.reque...
2006 Jun 16
0
rake spec controller test output hideus.
...94
@session_options={}, @accepts=nil,
@symbolized_path_parameters={:controller=>"user", :action=>"signup"},
@query_parameters={"action"=>"signup"}, @host="test.host",
@cookies={}, @env={"REMOTE_ADDR"=>"0.0.0.0",
"REQUEST_URI"=>"/user/signup?user=passwordnewpasswordloginnewbobemailnewbob%40mcbob.compassword_confirmationwrong",
"SERVER_PORT"=>80, "REQUEST_METHOD"=>"POST"},
@path_parameters={"action"=>"signup", "controller"=>"us...
2006 Jan 08
4
Redirect to where I was
...an action
back to a previously viewed page. As a quick fix I created two little
methods in the controllers/application.rb. Does this seem like an ok
way to go?
Thanks,
Peter
class ApplicationController < ActionController::Base
def i_was_here
session[:i_was_here] = request.env[''REQUEST_URI'']
end
def redirect_to_where_i_was
redirect_to session[:i_was_here]
end
end
2006 Jul 20
5
Apache 2.2, Mongrel and #caches_page
Hi !
I''m no expect when it comes time to configure Apache. I 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
2010 Apr 21
4
Accessing the router from a helper
...utes
url = if url
if url.is_a? String
url
else
routes.generate url
end
else
routes.generate :controller => text
end
unless text.is_a? String
text = t text
end
active = request.request_uri == url
"<li #{''class="active"'' if active}>#{ link_to text, url }</li>"
end
end
Thomas
--
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...
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://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
I also added:
<Location /balancer-manager>
SetHandler b...
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.
>
> RewriteCond %{SERVER_PORT} !^443$
> RewriteRule ^...
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
2007 Mar 28
3
Camping on Dreamhost - Please Help!
Dan
did you get camping running on dreamhost already??
i?m trying to run it also but i haven''t succeed yet. it runs on
command line but when i add the rewrite rules on .htaccess i get a
internal server error.
I emailed support to ask about ScriptAlias and they say they cannot
change or add that to apache conf.
--
Andr? G. Cardozo
2007 Mar 25
3
Can''t seem to get rewrite rules to work with Apache
Hi,
I''m struggling to get an Apache rewrite rule to work. I have a
simple rule that for a request to "a.html" will be sent to "b.html".
However the requests for "a.html" are always sent to my Rails apps.
Here is my Apache configuration:
<VirtualHost 216.154.219.19:80>
<Directory /u/apps/simplelog_2.0.2/public/>
Options FollowSymLinks