Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: php rewrite question

  1. #1
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123

    Cool php rewrite question

    First of all thanks for all the helpful advice.
    It's great to have a site like this to turn to for help.

    My question is this (I think this idea would be valuable for many):

    I would like to have members of my affiliate program be able to promote a more SE friendly URL like:
    http://1111.com/xxx1.php
    http://1111.com/xxx2.php
    http://1111.com/xxx3.php

    instead of http://1111.com/index.php?x=xxx1
    http://1111.com/index.php?x=xxx2
    http://1111.com/index.php?x=xxx3

    another example:

    http://www.2222.com/?x=dedicated change to
    http://www.eastsolid.com/dedicated/

    Is there a way to setup a rewrite in the "xxxx" directory to automatically insert the "index.php?x=name" before the affiliate code?

    I have been searching all over the net all day and finally found your site. Can you help?

    Sincerely,
    Larry Pappas
    Last edited by wagehost; February 20th, 2008 at 22:26.
    Wagehost.com
    99.9% Uptime guarantee | Low Cost Hosting
    Sign Up With Us, We also Provie 20,000-50,000 Visitors To your Site For Free

  2. #2
    CEO BrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really nice BrandonTheG's Avatar
    Join Date
    Apr 2006
    Location
    Massachusetts
    Posts
    1,251
    Sorry, it's 3:30 AM and I got this nasty headache, but something like this should work.

    Code:
    RewriteEngine on
    
    RewriteRule ^([0-9]+).php$ index.php?x=$1
    RewriteRule ^dedicated/$ index.php?x=dedicated
    So as you can see, just put the ID here: http://brandonsgames.com/usa8host/1111.php.

    Or you can use forsay "dedicated": http://brandonsgames.com/usa8host/dedicated/.
    Last edited by BrandonTheG; February 21st, 2008 at 02:34.
    Brandon Long | Wicked Free Hosting
    █ brandon[@]wfh[.]im | 1-877-927-7606
    Enterprise Free Hosting! Try us today

  3. #3
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Last edited by wagehost; February 21st, 2008 at 14:19.
    Wagehost.com
    99.9% Uptime guarantee | Low Cost Hosting
    Sign Up With Us, We also Provie 20,000-50,000 Visitors To your Site For Free

  4. #4
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    like this one:http://www.eastsolid.com/?x=dedicated to
    http://www.eastsolid.com/dedicated\
    onliy when you click the link
    Wagehost.com
    99.9% Uptime guarantee | Low Cost Hosting
    Sign Up With Us, We also Provie 20,000-50,000 Visitors To your Site For Free

  5. #5
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Last question

    You know me I create a name call test.php
    I am just know the PHP

    Then i create a folder

    Like name folder call test

    and the URL will be:http://www.mywebsite.com/?x=test

    I get it
    Wagehost.com
    99.9% Uptime guarantee | Low Cost Hosting
    Sign Up With Us, We also Provie 20,000-50,000 Visitors To your Site For Free

  6. #6
    CEO BrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really nice BrandonTheG's Avatar
    Join Date
    Apr 2006
    Location
    Massachusetts
    Posts
    1,251
    Not really sure what you are asking, you want /dedicated.php to go to /index.php?x=dedicated?

    So that'd be like

    Code:
    RewriteRule ^dedicated.php$ index.php?x=dedicated
    Brandon Long | Wicked Free Hosting
    █ brandon[@]wfh[.]im | 1-877-927-7606
    Enterprise Free Hosting! Try us today

  7. #7
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName rem.usa8.net.ru
    AuthUserFile /home/remusa8/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/remusa8/public_html/_vti_pvt/service.grp

    RewriteEngine on

    RewriteRule ^([0-9]+).php$ index.php?x=$1
    RewriteRule ^dedicated/$ index.php?x=dedicated


    this is my .htaccess file

    is corrected.. if not corrected please tell me.

    my rewrite Url still not working

    larry

  8. #8
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Quote Originally Posted by blong View Post
    Not really sure what you are asking, you want /dedicated.php to go to /index.php?x=dedicated?

    So that'd be like

    Code:
    RewriteRule ^dedicated.php$ index.php?x=dedicated
    can yo give me code so I will test it. or I will give my username and password.
    I dont know where I wrong/

    please I need you help

    can you give me all file from http://brandonsgames.com/usa8host only for usa8host folder

    can I get the code from the site..



    Larry
    Last edited by wagehost; February 21st, 2008 at 20:34.

  9. #9
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    how can you get code like this:
    http://brandonsgames.com/usa8host/index.php?x=11111
    when I add index.php?x=urbest
    the website will said "You called the page urbest"

    please how can I do that. i alread put Code into htaccess.

    and what can i do next. created a mysql or created a page like your

    I am dont know how to created page like yours
    http://brandonsgames.com/usa8host
    http://brandonsgames.com/usa8host/index.php?x=dedicated

    larry
    Last edited by wagehost; February 22nd, 2008 at 00:42.

  10. #10
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    anybody help me

    I need it

    Thank you very much

    i waiting you reply

  11. #11
    CEO BrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really niceBrandonTheG is just really nice BrandonTheG's Avatar
    Join Date
    Apr 2006
    Location
    Massachusetts
    Posts
    1,251
    I have 2 files.

    1. index.php
    Code:
    <?php
    
    printf("You called the page %s", $_GET[x]);
    
    ?>
    2. .htaccess
    Code:
    RewriteEngine on
    
    RewriteRule ^([0-9]+).php$ index.php?x=$1
    RewriteRule ^dedicated/$ index.php?x=dedicated
    Brandon Long | Wicked Free Hosting
    █ brandon[@]wfh[.]im | 1-877-927-7606
    Enterprise Free Hosting! Try us today

  12. #12
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Quote Originally Posted by [x10]Brandon View Post
    I have 2 files.

    1. index.php
    Code:
    <?php
    
    printf("You called the page &#37;s", $_GET[x]);
    
    ?>
    2. .htaccess
    Code:
    RewriteEngine on
    
    RewriteRule ^([0-9]+).php$ index.php?x=$1
    RewriteRule ^dedicated/$ index.php?x=dedicated
    Hi:

    is working now.. but didnt automatically redirect to larry

    I want this one redirect to http://rem.usa8.net.ru/test/index.php?x=larry
    and look like this one
    Like this one:http://rem.usa8.net.ru/test/larry


    is ok to do that

    how can I get code from Index.php

    larry
    Last edited by wagehost; February 23rd, 2008 at 01:00.

  13. #13
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Please anybody help me with the PHP

    I just bough the php form amzon.com

    it will come to my home next monday

    please

    thank you very much

    larry

  14. #14
    stop staring krakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to beholdkrakjoe is a splendid one to behold krakjoe's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    3,616
    Code:
    RewriteRule ^([0-9]+).php$ index.php?x=$1
    should be

    Code:
    RewriteRule ^(.*).php$ index.php?x=$1
    (\__/) Joe Watkins
    (='.'=) Software Architect
    (")_(") http://pthreads.org
    Copy and paste bunny into your sig, help him gain world domination.

  15. #15
    Senior Member wagehost can only hope to improve
    Join Date
    Oct 2006
    Posts
    123
    Quote Originally Posted by krakjoe View Post
    Code:
    RewriteRule ^([0-9]+).php$ index.php?x=$1
    should be

    Code:
    RewriteRule ^(.*).php$ index.php?x=$1

    HI:

    You give the code make my website error messenge

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@rem.usa8.net.ru and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


    --------------------------------------------------------------------------------

    Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at rem.usa8.net.ru Port 80
    Wagehost.com
    99.9% Uptime guarantee | Low Cost Hosting
    Sign Up With Us, We also Provie 20,000-50,000 Visitors To your Site For Free

Closed Thread

Similar Threads

  1. mod rewrite help, .php to .shtml
    By XeonGX in forum Programming Help
    Replies: 6
    Last Post: March 25th, 2007, 02:28
  2. Mod Rewrite Help
    By SomebodyIam in forum Programming Help
    Replies: 7
    Last Post: July 2nd, 2006, 07:02
  3. Why not do rewrite
    By Antonio in forum FreeWebspace.net Feedback
    Replies: 1
    Last Post: March 25th, 2006, 22:37
  4. mod rewrite help
    By gastong in forum Programming Help
    Replies: 6
    Last Post: October 12th, 2005, 10:00
  5. image insertion question, and jscript link question
    By Acerbus in forum Webdesign / HTML
    Replies: 4
    Last Post: February 26th, 2003, 11:29

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