The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 12:25:24 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Easy I think, dont know whats wrong with mine  (Read 2862 times)
jp29997
Rookie
**
Offline Offline

Posts: 13


View Profile
« on: July 12, 2007, 02:32:23 PM »

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?
Logged

No links in signatures please
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #1 on: July 13, 2007, 06:57:19 AM »

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
« Last Edit: July 13, 2007, 06:59:19 AM by Bompa » Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #2 on: July 13, 2007, 07:09:55 AM »

THE_REQUEST
The full HTTP request line sent by the browser to the server (e.g., "GET /index.html HTTP/1.1"). 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

Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!