Warning: Illegal string offset 'url' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'title' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'url' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'title' in /home/redho/public_html/forum/includes/page_header.php on line 381
How do I redirect all files from a folder to other location? - Search Engine Optimization and promotion - Programming Forums
redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Monday 15 October 2018 21:34

Ask your IT question here

How do I redirect all files from a folder to other location?



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Search Engine Optimization and promotion
View previous topic :: View next topic  
Author Message
Mihu
Guest Programmer




Hello I have an old part of my site that I don't use anymore.
I would like to redirect all the files in that folder to
the index page in new folder i use.

like this:
old_folder/anyfile.php --> mysite . com/new_folder/index.php


When I try doing a simple Apache 301 redirect
Code:
redirect 301 /old_folder ht tp://mysite . com/new_folder/index.php/index.php


it works like this:
old_folder/anyfile.php --> mysite . com/new_folder/index.php/anyfile.php
which is not what I want please help!

Reply with quote
 
Madwolf
Site Admin


Joined: 22 Dec 2004
Posts: 77
You can try:

Code:
RedirectMatch 301 /old_folder/.* http://mysite.com/new_folder/index.php

it should do the trick.

Reply with quote
 
jane0109
New Programmer


Joined: 15 Feb 2009
Posts: 1
Here's a link to step by step redirection set up php(dot)about(dot)com/od/learnphp/ht/phpredirection.htm
_________________
Live Help

Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Search Engine Optimization and promotion


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo