Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble redirecting all pages in a folder to a page at root level
    primarykey
    data
    text
    <p>I've searched, tried various examples, and none, other than creating an explicit list of redirect statements seems to work.<br /> The biggest issue I have is that, although I have access to deploy web pages to the site, I do not have access to any web hosting control panel - site access was inherited, and until now it's been fine, but I think that it is either running an old version of apache, or rewrite rules are not allowed.<br /> Anywa, over the years, the site has changed several times, and after registering the site with Google Webtools, I found the list of pages that gave crawl errors, so created an HTACCESS file to deal with these.<br /> Over the years, there have been folders deployed and named in camel case and all lower case, and so all I wanted to do was to redirect all files in a folder to the new folder in the .htaccess file level, i.e.<br /> My .HTACCESS currently has 120 lines, and an example batch are as follows:<br /> redirect 301 /challenge/stanley_steamer.htm /lsr_history.html<br /> redirect 301 /challenge/stanley_steamer.html /lsr_history.html<br /> redirect 301 /Challenge/index.htm /lsr_history.html<br /> redirect 301 /Challenge/Record.htm /lsr_history.html<br /> redirect 301 /Challenge/Stanley_Steamer.htm /lsr_history.html<br /> redirect 301 /Challenge/Sponsors/Avery_Weigh-Tronix.htm /sponsors.html<br /> redirect 301 /contact/index.html /contact.html<br /> redirect 301 /design/details.html /design.html<br /> redirect 301 /design/index.html /design.html<br /> redirect 301 /Design/Engine-drive_train.htm /design.html<br /> redirect 301 /Design/Rear.htm /design.html<br /> redirect 301 /Design/Home_Page.htm /design.html<br /> redirect 301 /Design/index.htm /design.html<br /> As you can see, I have some cases where the folder name is camel, others lower, and other cases where there is a htm and an html file of the same name that is listed in the crawl error log.<br /> All I want to do is, in the example above, redirect all pages from /Challenge/ and /challenge/ to lsr_history.html, but all files in /Challenge/Sponsors/ to sponsors.html.<br /> I also have a huge list of individual team pages that I list one by one and each one redirects to the new team page.<br /> I've tried examples like:<br /> RedirectMatch 301 ^/[Cc]hallenge/ /challenge.html, but this returns a 'Error 404 Not found'.<br /> Any ideas or examples of how I can cut down my htaccess file to simplify this will be gratefully received.<br /> Regards<br /> Martin</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload