Jump to content

.htaccess parent directory


Recommended Posts

I'm trying to redirect a directory to the main index (which is in a sub dir already). I have tried a few different things but nothing has worked. Like I said I don't want to use my domain, in the script. I have tried using the html ../ but that doesn't work. I guess if I have to, I can just use an html/php script and do it that way, but I would like to use .htaccess instead. Any ideas?

Example

Redirect 301 /tuts/ ../

Link to comment
Share on other sites

  • 3 weeks later...

...Like I said I don't want to use my domain, in the script.

I think you will need to use the full absolute URL (with the domain) if you are doing a Redirect, since the new address is returned to the browser for it to retry. However, if you have mod_rewrite then I think you can use path parts with the RewriteRule (ie. what looks like relative paths, but not "../") in your substitution.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...