Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

.htaccess redirection

  • 26-06-2006 9:17pm
    #1
    Registered Users, Registered Users 2 Posts: 1,667 ✭✭✭


    Hi

    I have been struggle to understand how to do simple redirection using .htaccess. Always ended up incorrect redirection and site becomes unusable. My website structure is this way, main site files are uploaded under htpp://domain.com/wp

    By default I need to get http://domain.com transfers to http://domain.com/wp. I could have used meta redirection if user enters http://domain.com but how do i set this up using .htaccess?

    These are the codes that seem not properly work the way I want.
    Redirect / http://domain.com/wp
    
    Redirect / http://domain.com/wp/
    
    Redirect / /wp
    

    Any ideas?

    Mart


Comments

  • Registered Users, Registered Users 2 Posts: 5,517 ✭✭✭axer


    Not 100% sure and I don't have time to test but I think this will do it:
    Redirect permanent / http://domain.com/wp


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    You can't use Redirect to rewrite to something above the DocumentRoot, as it's a catch-all. So if you use the last example there, requests for /wp will be redirected to /wp/wp. You'll need to either create a page in the DocumentRoot with a meta redirect, or use mod_rewrite. The first is the simplest route.

    adam


Advertisement