Results 1 to 2 of 2
  1. #1

    Question mod_rewrite help.

    I currently have the following in my .htaccess file and its working fine for my main site...

    RewriteRule ^([^/\.]+)/?$ /index.php?p=$1 [L]
    RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /index.php?p=$1&lang=$2 [L]
    RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?p=$1&lang=$2&id=$3 [L]
    But i need a set of different rules for /admin/ and /client/ as they are different files to the main index.php. How would i implement such a thing?

    Ive tried adding the following above the code above but no joy..

    RewriteRule ^(admin)/?$ /admin/index.php [L]
    RewriteRule ^(admin)/([^/\.]+)/?$ /admin/index.php?p=$1 [L]

  2. #2
    Join Date
    Feb 2003
    L.A. C.A.

    RewriteCond %{REQUEST_FILENAME} !-d

    it will check if the directory exists or not then put a seperate .htaccess in the directory.

Posting Permissions

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