Web Analytics Made Easy -
StatCounter Need help with apache mod-rewrite! - CodingForum

Announcement

Collapse
No announcement yet.

Need help with apache mod-rewrite!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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; Apr 4, 2009, 01:48 AM. Reason: Posted in wrong forum
Working...
X