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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi,
Try this .htaccess file:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^\/locations\/(.*)$ /?spot=$1
On Oct 6, 8:28 pm, Sav <savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
That didn''t work (and appears to be backwards). I tried the following w/ no luck... RewriteRule ^\/?spot=(.*)$ /locations/$1 RewriteRule ^\/?spot=(.*)$ /locations/$1 [R=301,L] RewriteRule /?spot=(.*)$ /locations/$1 [R=301,L] This is also for a subdomain under Rails... http://m.domain.com/?spot=8888 to http://m.domain.com/locations/8888 On Oct 6, 5:34 pm, Gerson Minichiello <gerson.minichie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Try this .htaccess file: > > RewriteEngine On > RewriteCond %{SCRIPT_FILENAME} !-f > RewriteCond %{SCRIPT_FILENAME} !-d > RewriteRule ^\/locations\/(.*)$ /?spot=$1 > > On Oct 6, 8:28 pm, Sav <savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
guys even my problem is somewhat related to the same as currently hosted my application on bluehost which is running on port 12004. so when every i try to access my site "http:///www.mydomain.com" its redirect me to " http://mydomain.com:12004" so if some one guide me that will be very helpful thanks.... regards abhishek On Tue, Oct 7, 2008 at 8:00 AM, Sav <savarino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > That didn''t work (and appears to be backwards). I tried the following > w/ no luck... > > RewriteRule ^\/?spot=(.*)$ /locations/$1 > RewriteRule ^\/?spot=(.*)$ /locations/$1 [R=301,L] > RewriteRule /?spot=(.*)$ /locations/$1 [R=301,L] > > This is also for a subdomain under Rails... > > http://m.domain.com/?spot=8888 > to > http://m.domain.com/locations/8888 > > > > On Oct 6, 5:34 pm, Gerson Minichiello <gerson.minichie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > Hi, > > > > Try this .htaccess file: > > > > RewriteEngine On > > RewriteCond %{SCRIPT_FILENAME} !-f > > RewriteCond %{SCRIPT_FILENAME} !-d > > RewriteRule ^\/locations\/(.*)$ /?spot=$1 > > > > On Oct 6, 8:28 pm, Sav <savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
@abhishek - you can catch all traffic on a port and redirect like this
(but beware of an infinite loop)...
RewriteCond ''%{SERVER_PORT}" "^12004$"
RewriteRule "^(.*)$" "http://%{SERVER_NAME}$1" [R=301,L]
Anyone able to help me with a redirect from "/?spot=8888" to "/
locations/8888"? Simple yet elusive :(
On Oct 7, 12:42 am, "Abhishek shukla"
<bettera...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> guys even my problem is somewhat related to the same as currently hosted my
> application on bluehost which is running on port 12004. so when every i try
> to access my site "http:///www.mydomain.com" its redirect me to
"http://mydomain.com:12004" so if some one guide me that will be very
helpful
> thanks....
>
> regards
> abhishek
>
> On Tue, Oct 7, 2008 at 8:00 AM, Sav
<savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > That didn''t work (and appears to be backwards). I tried the
following
> > w/ no luck...
>
> > RewriteRule ^\/?spot=(.*)$ /locations/$1
> > RewriteRule ^\/?spot=(.*)$ /locations/$1 [R=301,L]
> > RewriteRule /?spot=(.*)$ /locations/$1 [R=301,L]
>
> > This is also for a subdomain under Rails...
>
> >http://m.domain.com/?spot=8888
> > to
> >http://m.domain.com/locations/8888
>
> > On Oct 6, 5:34 pm, Gerson Minichiello
<gerson.minichie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > wrote:
> > > Hi,
>
> > > Try this .htaccess file:
>
> > > RewriteEngine On
> > > RewriteCond %{SCRIPT_FILENAME} !-f
> > > RewriteCond %{SCRIPT_FILENAME} !-d
> > > RewriteRule ^\/locations\/(.*)$ /?spot=$1
>
> > > On Oct 6, 8:28 pm, Sav
<savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > > 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Hey thanks sav but still no success...
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteCond ''%{SERVER_PORT}" "^12004$"
RewriteRule "^(.*)$" "http://%{SERVER_NAME}$1" [R=301,L]
This is my .htaccess setting and seriously no idea.... wat to do... new in
deployment.
Note i don''t have an root access.. the only file which i can editi s
.htaccess and other files from public folder........
Thanks sav if you can help me
regards
Abhishek Shukla
On Tue, Oct 7, 2008 at 8:37 PM, Sav
<savarino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> @abhishek - you can catch all traffic on a port and redirect like this
> (but beware of an infinite loop)...
>
> RewriteCond ''%{SERVER_PORT}" "^12004$"
> RewriteRule "^(.*)$" "http://%{SERVER_NAME}$1"
[R=301,L]
>
>
> Anyone able to help me with a redirect from "/?spot=8888" to
"/
> locations/8888"? Simple yet elusive :(
>
>
> On Oct 7, 12:42 am, "Abhishek shukla"
<bettera...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > guys even my problem is somewhat related to the same as currently
hosted
> my
> > application on bluehost which is running on port 12004. so when every
i
> try
> > to access my site "http:///www.mydomain.com" its redirect me
to "
> http://mydomain.com:12004" so if some one guide me that will be very
> helpful
> > thanks....
> >
> > regards
> > abhishek
> >
> > On Tue, Oct 7, 2008 at 8:00 AM, Sav
<savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > That didn''t work (and appears to be backwards). I tried
the following
> > > w/ no luck...
> >
> > > RewriteRule ^\/?spot=(.*)$ /locations/$1
> > > RewriteRule ^\/?spot=(.*)$ /locations/$1 [R=301,L]
> > > RewriteRule /?spot=(.*)$ /locations/$1 [R=301,L]
> >
> > > This is also for a subdomain under Rails...
> >
> > >http://m.domain.com/?spot=8888
> > > to
> > >http://m.domain.com/locations/8888
> >
> > > On Oct 6, 5:34 pm, Gerson Minichiello
<gerson.minichie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > wrote:
> > > > Hi,
> >
> > > > Try this .htaccess file:
> >
> > > > RewriteEngine On
> > > > RewriteCond %{SCRIPT_FILENAME} !-f
> > > > RewriteCond %{SCRIPT_FILENAME} !-d
> > > > RewriteRule ^\/locations\/(.*)$ /?spot=$1
> >
> > > > On Oct 6, 8:28 pm, Sav
<savar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > > > 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On Mon, Oct 6, 2008 at 7:30 PM, Sav <savarino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > That didn''t work (and appears to be backwards). I tried the following > w/ no luck...You probably want to turn on/up rewrite logging for more information on /why/ you''re having "no luck", instead of guessing :-) Something like: RewriteLog "/usr/local/apache-httpd-2.2.9/logs/rewrite.log" RewriteLogLevel 3 See the httpd docs for more info. HTH, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Hassan, Thanks for reply the main issue is that i don''t have an access to apache folder currently my application running on Bluehost with a dedicated IP address. And even i am not able to access rewrite.log file as well :( so that is why my is screwed up.. So please guys help me..... Regards Abhishek shukla On Tue, Oct 7, 2008 at 11:04 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Mon, Oct 6, 2008 at 7:30 PM, Sav <savarino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > That didn''t work (and appears to be backwards). I tried the following > > w/ no luck... > > You probably want to turn on/up rewrite logging for more information > on /why/ you''re having "no luck", instead of guessing :-) > > Something like: > > RewriteLog "/usr/local/apache-httpd-2.2.9/logs/rewrite.log" > RewriteLogLevel 3 > > See the httpd docs for more info. > > HTH, > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Oct 7, 2008 at 11:39 AM, Abhishek shukla <betterabhi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for reply the main issue is that i don''t have an access to apache > folder currently my application running on Bluehost with a dedicated IP > address. And even i am not able to access rewrite.log file as wellYou should be able to set this up through .htaccess with logging set to go to a directory you have write permissions to. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---