Forum Moderators: phranque

Message Too Old, No Replies

need help in .htaccess file

i have problem in ma .htaccess file

         

itsmani1

8:29 am on Aug 27, 2005 (gmt 0)



my simple .htaccess file at root of ma site :
------------------------------------------------
RewriteEngine On
RewriteRule ^(.*).html content.php?ContentID=$1
------------------------------------------------
i want this work in root of my site only mean to say is it should not work on other directories of the site like.

root/admin/test
now i don't want to see its effects in test folder how can i do that?

Thanx.
Mannan.

[edited by: jatar_k at 2:23 pm (utc) on Aug. 27, 2005]
[edit reason] no emails thanks [/edit]

jdMorgan

3:36 pm on Aug 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need a pattern that will reject the "/" character, then. I'd suggest:

RewriteEngine On
RewriteRule ^([^/.]+)\.html$ /content.php?ContentID=$1 [L]

For more informaiton, see the reference material cited in our forum charter (link at upper left of this page).

Jim