This is a discussion on ".htaccess help - moved directory" within the Web Page Design section. This forum, and the thread ".htaccess help - moved directory are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
.htaccess help - moved directory
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
.htaccess help - moved directory
I have moved the contents of one of my directories to the root, and I now need to use my htaccess to rewrite an incoming request for a file to the new url.
Say I had a page at www.domain.com/folder/page.html it is now located at www.domain.com/page.html I know I can do a 301 for each page but as there are thousands it isnt an option. i need it to see what the requested page is and redirect it to the root by removing the folder part of the url. As I'm useless at rewrite i've tried to come up with something but they dont work as intended. Can anyone help me here?? Thanks in advance. Mark |
|
|
|
||||
|
Re: .htaccess help - moved directory
I think you need this:-
RewriteRule ^folder/(.*)$ http://www.yourdomain.com/$1 [L]
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| htaccess, help, moved, directory |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Forum moved to new server | shammy2007 | Job Opportunities | 5 | Feb 9th, 2008 01:39 |
| Footer moved? | PicoDeath | Web Page Design | 5 | Aug 17th, 2007 10:51 |