
![]() |
jp29997
So i have some posts that are in URLs like this
http://www.mydomain.com/07/12/title-i-want-to-avoid-# where that # is a title number that I have many of in the dir -- title-i-want-to-avoid-1,title-i-want-to-avoid-2, title-i-want-to-avoid-3, etc. except for the original which is http://www.mydomain.com/07/12/title-i-want-to-avoid so missing that final -# I want to redirect the rest to the home page. I have ended up here in a loop RewriteCond %{THE_REQUEST} ^[A-Z]{3, 9} /.*title-i-want-to-avoid-.*$\ HTTP/ RewriteRule ^(.*)title-i-want-to-avoid-.*$ /$1 [R=301,L] anyone see my mistake? Bompa
Well, it's not exactly clear to me what you are trying to do.
I guess anything that resides in a certain directory and ends with numbers would be close. oh well, Bompa Bompa
THE_REQUEST
The full HTTP request line sent by the browser to the server (e.g., "GET /index.html HTTP/1.1" ![]() REQUEST_URI The resource requested in the HTTP request line. (In the example above, this would be "/index.html".) It might be less confusing if you use the latter. Bompa |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads