LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-05-2009, 04:24 PM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
mod rewrite based on URL string


I'm sitting here with a nice mod_rewrite cheat sheet but don't know where to begin on a simple thing (as far as I can tell).

I want to take our login page and redirect to an https login. Basically the login link is on any page and the url has a simple include of displayLogin=true.

So I need to have a rule that says if the URL has showLogin=true, redirect to https://domain.com/page?showLogin=true

Is this a lot for an new apache guy to read on, or is it simply one condition and one rule?

Thanks
 
Old 06-05-2009, 05:09 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
perhaps I didn't fully understand your question (I was a bit confused), but here's my answer:

Code:
RewriteEngine on
RewriteRule showLogin=true https://domain.com/page?showLogin=true
--make sure mod_rewrite is loaded to apache, and bounce.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache rewrite port based on URL.. can it? sir-lancealot Linux - Server 1 05-13-2009 03:06 AM
Squid redirector/URL rewrite based on MIME type drmouse Linux - Server 0 02-25-2008 06:07 AM
Apache2 mod vhost_alias - problems with .htaccess mod rewrite d_t_baker Linux - Server 1 08-16-2007 08:32 PM
Mod REWRITE url rewriting gabsik Linux - Networking 1 09-29-2006 06:24 AM
Mod rewrite problem .. want a friendly/readable url vikram_cvk Linux - Server 1 08-23-2006 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration