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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Head Banging over Rewrite Rules

    I am looking to use a URL like http://go.mydomain.org/822 and have it rewritten to a URL http://mydomain.org/abc/index.php?page=index&id=822&showcomments=0

    All I keep on seeing is this message
    The requested URL /822 was not found on this server.

    The Rewrite stuff I have is
    Code:
    RewriteEngine On    # Turn on the rewriting engine
    RewriteCond %{HTTP_HOST} ^go\.(.)/[0-9]+$ [NC]
    RewriteRule ^/(.) http://$1/abc/index.php?page=index&id=$2&showcomments=0 [NC,L]
    Can someone help me with this.

    I basically took an Apache website example and modified it to what I would like but its not working. The server has URL rewriting but I can not seem to get anything I set up to work. It is obviously doing something because it can't find the URL /822 on the server.

  • #2
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So I been reading and trying to understand and tried other things and now have...

    Code:
    Options +FollowSymLinks
    RewriteEngine on    # Turn on the rewriting engine
    RewriteRule ^([0-9]+)\.(.)$ http://$2/abc/index.php?page=index&id=$1&showcomments=0 [NC,R]
    which will accept a url like http://1234.mydomain.org/ and turn it in to or should turn it in to http://mydomain.org/abc/index.php?page=index&id=$1&showcomments=0 BUT!!! It doesn't, it turns it in to http://1234.mydomain.org/abc/ and I am still banging my head.

    What am I doing wrong here?


  •  

    Posting Permissions

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