+ Post New Thread
Results 1 to 3 of 3
Web Development Thread, .htaccess rewrite rule in Coding and Web Development; I have a joomla site which has a non-secure side and a secure side (ie. it can be accessed via ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,655
    Thank Post
    516
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831

    .htaccess rewrite rule

    I have a joomla site which has a non-secure side and a secure side (ie. it can be accessed via either http or https). The problem is, I want it to default to http for normal viewing, and then when someone specifically goes into the 'shop' module I want it to redirect to the https site. I have enabled mod_rewrite and created the below in my .htaccess file.

    Code:
    RewriteEngine   on
    RewriteCond     %{SERVER_PORT} ^80$
    RewriteRule     ^http://%{SERVER_NAME}/index.php?option=com_virtuemart(.*)$ https://%{SERVER_NAME}/index.php?option=com_virtuemart$1 [L,R]
    But, as you can probably guess from the fact that I am posting here, it doesn't work.

    Anyone got any pointers, as I've never really got my head around rewrite rules. I'm probably missing something blatantly obvious...

  2. #2
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Doesn't virtuemart provide you with an automatic redirect when you're handing any secure mode stuff?

    Certainly it's headed that way in version 1.1 (which is still rather buggy)

  3. Thanks to contink from:

    localzuk (7th May 2008)

  4. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,655
    Thank Post
    516
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    Quote Originally Posted by contink View Post
    Doesn't virtuemart provide you with an automatic redirect when you're handing any secure mode stuff?

    Certainly it's headed that way in version 1.1 (which is still rather buggy)
    Actually, on closer inspection, there does appear to be an option on this. I'll have a play. Cheers

    EDIT: That seems to be working I noted that the box with the secure site in defaults to http for some reason.
    Last edited by localzuk; 7th May 2008 at 09:51 AM.

SHARE:
+ Post New Thread

Similar Threads

  1. Exim rewrite rules
    By Geoff in forum *nix
    Replies: 2
    Last Post: 3rd March 2008, 10:30 PM
  2. cylie rule
    By russdev in forum General Chat
    Replies: 1
    Last Post: 16th February 2008, 09:42 AM
  3. Rule 87
    By m25man in forum Windows
    Replies: 8
    Last Post: 16th March 2006, 11:52 PM
  4. isa 2004 Network rule
    By kaleem in forum Windows
    Replies: 1
    Last Post: 11th February 2006, 12:55 PM
  5. Replies: 35
    Last Post: 31st August 2005, 07:46 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •