Results 1 to 3 of 3

Thread: .htaccess Rewrite URL

  1. #1
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default .htaccess Rewrite URL

    Hello guys,

    I am trying to rewite URl: http://mydomain.com/member.php?member=ABC

    into http://ABC.mydomain.com (better) or http://mydomain.com/ABC but could not. So can you help me with this, I use these sentences:

    RewriteEngine on
    RewriteRule ^.htaccess$ -f
    RewriteCond %{HTTP_HOST} !^www.domain.info
    RewriteCond %{HTTP_HOST} ^([^.]+).domain.info
    rewriteCond http://www.domain.info/member.php -d

    but it does not work

    I use Blog system of 6al.net

    thanks,

    Thanh Nguyen

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thanhnguyen View Post
    I am trying to rewite URl: http://mydomain.com/member.php?member=ABC

    into http://ABC.mydomain.com (better) or http://mydomain.com/ABC but could not.
    The Apache documentation includes a URL rewriting guide, containing examples for producing canonical URLs and host names. However, these rewriting rules can only be applied using the core server configuration, not through distributed configuration files (.htaccess). Therefore, if you cannot modify the server configuration, or persuade your host to do so, you will not be able to achieve the effect you want.

    RewriteRule ^.htaccess$ -f
    This rule should be redundant: the server configuration should already deny access to any file beginning ".ht". If it doesn't, use a Files or FilesMatch directive to deny access, not mod_rewrite.

    Mike

  3. #3
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks,

    I got this

    Code:
    Options +FollowSymLinks +Indexes
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([^.]+)$ member.php?member=$1 [L]
    It works

    Thanh Nguyen

Tags for this Thread

Bookmarks

Posting Permissions

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