Results 1 to 2 of 2

Thread: .htaccess not working...

  1. #1
    Join Date
    Aug 2014

    Question .htaccess not working...

    Hello all,

    I just registered on these forums. I recently opted in the creation of a home designed website to handle my dev team. I can now use languages such as PHP HTML CSS (not lot of JS : praticaly impossible to get HTML elements with).

    Now i'm trying to apply an URL rewrite to rewrite urls that way :
    - User accessed address : http://www.sldt-team.net/index.php?exe=team
    - Wanted displayed address : http://www.sldt-team.net/team/

    But i'm un able to achieve this, only things i can achieve are :
    - 404
    - 500
    - Nothing changes

    Here is the code of my .htaccess :
    # rule for forcing www on main domain
    RewriteCond %{HTTP_HOST} ^sldt-team\.net$ [NC]
    RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    # rule for removing www on sub domains
    RewriteCond %{HTTP_HOST} ^www\.([^.]+\.sldt-team\.net)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
    RewriteRule ^/(.+)/ /index.php?exe=$1

  2. #2
    Join Date
    Mar 2012
    You do not need to rewrite www.sldt-team.net/index.php?exe=team to www.sldt-team.net/team/.

    Just create a sub-directory /team/ and put a modified version of index.php there. The modification is basically to add the line $exe='team'; or some such, to set the variable $exe to "team".
    Last edited by jedaisoul; 08-16-2014 at 08:58 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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