1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get htaccess 404 to redirect to Directory index NOT domain index

Discussion in 'Black Hat SEO' started by just-buyin-stuff, Nov 9, 2015.

  1. just-buyin-stuff

    just-buyin-stuff Registered Member

    Joined:
    Jun 30, 2013
    Messages:
    94
    Likes Received:
    44
    First off let me say yes I realize I could put "ErrorDocument 404 /offerdirectory/index.htm" in and that will do it. What I'm doing is redirects and want to add random text after the folder, ie abc,com/offer/randomtext . Now that works if you enter the 404 like I show above. My problem is I need to make htaccess files for over 100 folders.

    So what I'm hoping to find is a shortcut. I've tried googling but not knowing much about what I'm looking means I didn't find anything helpful. Hopefully someone knows a command or bit of code that will save me from having to edit every single htaccess file.
     
  2. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,056
    Likes Received:
    10,833
    Occupation:
    WHEREZ MA
    Location:
    BITCOINS AT?
    Home Page:
    Search for FilesMatch and use a regular expression to match the stuff after your directory name.