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"Applause. This does not include any additional headers sent by the browser.

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


Perkiset's Place Home   Politics @ Perkiset's