.htaccess tutorial

htaccess Elite


htaccess settings for directories

Ask your mod_rewrite and Redirection questions here, and get answers!

htaccess settings for directories

New postby BroIgnatius » 23 Nov 2009 07:25

Hi:

I have not found an answer to my problem, unless i missed it somewhere.

I need to be able to redirect any file from one directory to the same named file in another directory (and also to deal with case sensitive issues).

For example, I have tried the following (that doesn't work):

RewriteRule ^apologetics/qa/Answers/Defending_Faith/([^/\.]+)$ http://domain.com/Apologetics/QA/Answers/Defending_Faith/$1 [R,NC,L]
and
RewriteRule ^apologetics/qa/Answers/Defending_Faith/([^/\.]+)/?$ http://domain.com/Apologetics/QA/Answers/Defending_Faith/$1 [R,NC,L]

also tried:

RewriteRule ^apologetics/qa/Answers/Defending_Faith/(.*)$ http://domain.com/Apologetics/QA/Answers/Defending_Faith/$1 [R,NC,L]


Neither of these work. What this is suppose to do is take a URL with the wrong case folder name, and redirect to the correct case folder names.

Appreciate any help on this.
Reply With Quote
BroIgnatius
 
Posts: 1
Joined: 22 Nov 2009 06:00

Return to Redirect or Rewrite Questions