Home › Forums › Other › How to remove subdirectories using mod_rewrite in .htaccess › Reply To: How to remove subdirectories using mod_rewrite in .htaccess
July 28, 2014 at 1:10 pm
#176713
__
Participant
I’m not sure exactly what is causing it, but a “redirect loop” is where you have rewrite rules that create a URL that matches (the same or another) rewrite rule, so the URL is rewritten constantly, without end.
Is that the only rewrite rule you’re using?
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
To address your problem, you have a file at (for example):
/q/sleep-rest.htm
and you want to use the following URL to access it:
mysite.com/sleep-rest/
Correct?
RewriteRule ^/([a-zA-Z0-9_-]+)/?$ /q/$1.htm