Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: .htacces question  (Read 2181 times)

3Pinter

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 61
    • Fromthemill.nl
.htacces question
« on: May 18, 2007, 04:32:04 pm »

Guys / girls,

Stupid question however:

I have a website which url is like this:
http://www.notmydomain.nl/users/mysubdomain

I've got some php file with dirty urls (index.php?id=55) which I want to clean so I thought:
Code: [Select]

    php_value session.use_trans_sid 0


SecFilterEngine Off
SecFilterScanPOST Off

RewriteEngine On
#RewriteBase /Not Needed right?
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z_]+)/([^/]+) $1.php?id=$2 [L]
But this isn't working. I don't understand .htaccess at all. However I read a few articles but no good results at all...

Please can anybody confirm my coding is right? And does the subdomain I have affects the .htaccess??

Example:
http://www.brandevoort.org/users/preventhoevens/de_meldingen/27/
shows actually this file
http://www.brandevoort.org/users/preventhoevens/de_meldingen.php?id=27


http://www.brandevoort.org/users/preventhoevens/

3pinter

3Pinter

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 61
    • Fromthemill.nl
.htacces question
« Reply #1 on: May 20, 2007, 08:26:02 pm »

Okay, since nobody replies I tried it myself (by reading and reading and....)

Code: [Select]

    php_value session.use_trans_sid 0


SecFilterEngine Off
SecFilterScanPOST Off

RewriteEngine On
RewriteCond    %{REQUEST_FILENAME}  -d
RewriteRule    ^(.+[^/])$           /$1/  [R]
RewriteRule    ^(.*)/$          /$1.php
This should transform:
http://www.brandevoort.org/users/preventhoevens/myfile
into
http://www.brandevoort.org/users/preventhoevens/myfile/
(adding the trailing slash)
into
http://www.brandevoort.org/users/preventhoevens/myfile.php
(this step is transparent // not visible for the user)

However it doesn't work...
What am I doing wrong here?

3Pinter