Results 1 to 9 of 9

Thread: RewriteEngine

  1. #1
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default RewriteEngine

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-F
    RewriteRule ^([-_!*$@~:.a-zA-Z0-9]+)$ http://mydomain.org/profile.php?username=$1
    it says i need to » Add the code into your .htaccess file

    but wont that cause errors if i open .htaccess in a document and add it?

    there was a way in cpanel but i forgot.

  2. #2
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default

    I can not edit the post so i'll add the problem:

    i install Joovili, and create a user account.

    the website shows the new user and points to www.mydomain.org/princess/ or www.mydomain.org/wateva

    i click the lnik and it takes you to page not displayed, i do not know if this is because of the rewrite needed but any help?

    but profile.php?username=princess does?

    if u have not got a clue how do i change it so that all profiles point to profile.php?username=$id
    Last edited by Princess$; 09-01-2008 at 12:23 AM.

  3. #3
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    The rewrite is needed to have a /username directory. The only problem is, it thinks register.php is a user

  4. #4
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default

    Quote Originally Posted by .:Jack120:. View Post
    The rewrite is needed to have a /username directory. The only problem is, it thinks register.php is a user
    How do i do the rewrite and make it work?

  5. #5
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Code:
     RewriteEngine on
    RewriteRule ^$ index.php
    RewriteRule (^[-_A-Za-z0-9\ ]*$) profile.php?username=$1
    That should work, just add in the symbols you want usernames to allow into the brackets.

  6. #6
    Join Date
    May 2006
    Location
    England
    Posts
    114
    Tokens
    0

    Default

    Quote Originally Posted by Awfy View Post
    Code:
     RewriteEngine on
    RewriteRule ^$ index.php
    RewriteRule (^[-_A-Za-z0-9\ ]*$) profile.php?username=$1
    That should work, just add in the symbols you want usernames to allow into the brackets.
    How do i write it into the system so it's done:|

  7. #7
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    cPanel > File Manager (Click show hidden files) > public_html or www (Same place) then look for a file called ".htaccess" then add it in there

  8. #8
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Open Dreamweaver or whatever you use to code. Copy and paste the copy input a blank page. Then save as ".htaccess" with no extensions and so on. Then upload to your site's directory.

  9. #9
    Join Date
    May 2007
    Location
    Los Angeles
    Posts
    1,212
    Tokens
    115

    Latest Awards:

    Default

    either one of those would work, but i think Jack's idea would be much much easier.

    Quote Originally Posted by .:Jack120:. View Post
    cPanel > File Manager (Click show hidden files) > public_html or www (Same place) then look for a file called ".htaccess" then add it in there
    deranged.

Posting Permissions

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