Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with apache mod-rewrite!

    I've been trying to use mod-rewrite to change these urls:

    http://www.domain.com/php/store
    http://domain.com/php/store

    to this:

    http://store.domain.com/

    I have googled this and been trying different things that I've found for hours now. This is what I currently have in my .htaccess and it does not have any effect (nothing happens):

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
    RewriteRule ^(.*)(/php/store)(.*)$ http://store.lockjawrecordsonline.com$3 [R=301,L]
    Currently when I visit 'www.domain.com/php/store/somefolder/somefile.php', it should redirect me to 'store.domain.com/somefolder/somefile.php', but it doesn't do anything...

    What have I done wrong?

    Thanks for any help,
    Titanic_Fanatic

    *** I appologize, I just realized that I posted this in the wrong forum, how do I move it to the correct forum??? ***
    Last edited by titanic_fanatic; 04-04-2009 at 06:48 AM. Reason: Posted in wrong forum


 

Posting Permissions

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