View Full Version : redirect to folder even without ending slash "/"

07-26-2010, 09:04 AM
Redirect to a folder even without ending slash "/"
None of these seem to work:

RewriteEngine on
Redirect non www to www.example.co.za
RewriteCond %{HTTP_HOST} ^example\.co\.za$ [NC]
RewriteRule ^(.*)$ http://www.example.co.za/php/ $1 [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^example\.co\.za [NC]
RewriteRule ^(.*)$ http://www.example.co.za/php/$1 [L,R=301]
If I use example.co.za/php
Firefox: http://www.example.co.za/php/www/example/php
IE8: http://example.co.za/php

Forced to use http://example.co.za/php/ ending slash to get http://www.example.co.za/php/

07-29-2010, 09:36 PM
This will work in most cases - not mine.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum