Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

erika1959
Joined: Jul 22, 2002
# Posts: 60

View the profile for erika1959 Send erika1959 a private message

Posted: 2004-Aug-29 20:43
Edit Message Delete Message Reply to this message

I use mod_rewrite to write pages created dynamically from a basic .php file (keywords.php) to .html or .htm extensions.
To do this, my sites typically use the following .htaccess located in the root directory;

# -------------------------------------------------------------
# Redirect any .html file to /keywords.php

RewriteEngine on
Options +FollowSymLinks
RewriteRule .html$ /keywords.php [L]

# -------------------------------------------------------------

I now find I need to create a different set of pages, and do to this had intended to create a number of sub-directories with their own .htaccess files which would (so I thought), over-write the root .htaccess file and use the content of their own keywords.php .

Unfortunately, it seems that lower .htaccess files don't overwrite higher ones if they're identical in structure.

To get around this, I experimented with the following alternatives to the original .htaccess file - the first trying to limit the command to the root directory only, the second specifically excluding a named sub-directory;

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_URI}!/.*/
RewriteRule .html$ /keywords.php [L]

-----------------------------------------------------

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{REQUEST_URI}!/subfoldername/
RewriteRule .html$ /keywords.php [L]

Neither alternative works - the root directory .htaccess continues to over-ride the lower ones.

Anyone got any suggestions as to how I can work around this?

Many thanks,

Erika.


You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions