Results 1 to 6 of 6

Thread: Mod Rewrite Help

  1. #1
    Am I Bitter?...Absolutely nicedreams's Avatar
    Join Date
    Apr 2004
    Location
    Washington DC Metro
    Posts
    572

    Mod Rewrite Help

    Ok, so I can't get this mod rewrite working correctly.

    I'm trying to get this this url:

    www.mydomain.com/dir1/goto.php?section=xxxxx

    to turn into:

    www.mydomain.com/goto/section/xxxxx/ or www.mydomain.com/dir1/goto/section/xxxxx/

    I got this code in my .htaccess file in my root dir:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule goto/(.*)/(.*)/$ /dir1/goto.php?$1=$2

    That almost does what I want correctly, I get the correct page, but it doesn't change the links on the page to the right path. Example, a link on the page shows http://www.mydomain.com/goto/section...dir2/index.php where it should show www.mydomain.com/dir1/dir2/index.php

    Ugh.

    Jimmy

    Gay Amateur Paysites / Solo Twink Paysite
    Nice Dreams Cash
    http://www.nicedreamscash.com


  2. #2
    Life is a dick and when itīs get hard---just fuck it... DEVELISH's Avatar
    Join Date
    Jul 2005
    Posts
    2,367
    IMHO thats not a mod_rewrite problem but a "coding problem" within the software you are using - mod_rewrite does not change the url but maps an url to the actual one being.

    so in order to make happen what you want you need to change the urls being outputtet by your software

    hope thats correct & helps

    DEVELISH


  3. #3
    Am I Bitter?...Absolutely nicedreams's Avatar
    Join Date
    Apr 2004
    Location
    Washington DC Metro
    Posts
    572
    No, I think its a problem with the rewrite code.

    The links in the php file are correct and have index.php. The rewrite code is changing the base dir to the faked one. So the link with index.php is being added onto the fake dir link.

    Jimmy

    Gay Amateur Paysites / Solo Twink Paysite
    Nice Dreams Cash
    http://www.nicedreamscash.com


  4. #4
    Life is a dick and when itīs get hard---just fuck it... DEVELISH's Avatar
    Join Date
    Jul 2005
    Posts
    2,367
    Are the links outputted by your script as they should look like after a mod_rewrite?

    im my .htaccess I do something similar

    #RewriteRule ^directory/(.*)/(.*)\.html$ show.html?id=$1 [NC,L,QSA]

    this maps the URL http://www.domain.com/directory/Keyword1/Keyword2.html to http://www.domain.com/show.html?id=Keyword1 (keyword2 I do omit)

    However my script must produce a link like http://www.domain.com/directory/twinks/rimming.html in order for mod_rewrite to function correctly.



    DEV...


  5. #5
    Am I Bitter?...Absolutely nicedreams's Avatar
    Join Date
    Apr 2004
    Location
    Washington DC Metro
    Posts
    572
    Thanks, that helped me figure it out!

    Jimmy

    Gay Amateur Paysites / Solo Twink Paysite
    Nice Dreams Cash
    http://www.nicedreamscash.com


  6. #6
    Life is a dick and when itīs get hard---just fuck it... DEVELISH's Avatar
    Join Date
    Jul 2005
    Posts
    2,367
    You are very welcome, Jimmy


    DEVELISH


Posting Permissions

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