|
|||||||
New to SitePoint Forums? Register here for free!
|
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Enthusiast
![]() Join Date: Jul 2003
Posts: 68
|
.htaccess rewrite rule kills trailing slash auto redirect in parent directory
Summary of Problem: The .htaccess rewrite rule in /eventregistration/onlineteachers/ is overriding an "automatic" trailing-slash-adding redirect that is the default server behavior. This has the effect of not redirecting /eventregistration/onlineteachers to /eventregistration/onlineteachers/. A .htaccess rewrite rule in /eventregistration/ has no positive effect, but rather hair-pulling, premature-aging effect.
![]() First, in my httpd.conf (Apache/1.3.29), I have the following (to allow .htaccess files in this directory and subdirectories the ability to use RewriteRules): Code:
<Directory "/var/www/nwrel/eventregistration">
AllowOverride FileInfo
</Directory>
Code:
RewriteEngine on
RewriteRule !(\.gif|\.jp?g|\.css|\.php|^images/.*)$ index.php [nocase,last]
So I tried to write a rewrite rule in the /eventregistration/ directory's .htaccess file as per the Apache docs suggestion: Code:
RewriteEngine on
RewriteRule ^onlineteachers$ onlineteachers/ [R]
I have looked everywhere, but frankly I'm new at .htaccess and mod_rewrite, so maybe I just haven't loooked for the right things. I hope someone here can help. Thanks a ton. Amber |
|
|
|
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 02:02.










Threaded Mode