Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
erika1959
Joined: Jul 22, 2002
# Posts: 60
|
Posted: 2004-Aug-29 20:43
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:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- 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
|
|