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


  Search this Thread
Old 06-05-2009, 04:24 PM   #1
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

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

Old 06-05-2009, 05:09 PM   #2
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:

RewriteEngine on
RewriteRule showLogin=true
--make sure mod_rewrite is loaded to apache, and bounce.


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 > Forums > Linux Forums > Linux - Server

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

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