Results 1 to 12 of 12
Thread: Help with htaccess
Aug 16, 2012, 11:33 #1
- Join Date
- Aug 2012
- 0 Post(s)
- 0 Thread(s)
Help with htaccess
I am building my new site. My old homepage was accessible under mydomain.com/web/index.php
I used to use a simple meta-refresh (shame) in mydomain.com/index.php, but for my new site I want .htaccess file.
However, I do (ab)use my site also for other webpages. So I have some photoalbums under mydomain.com/newyork and mydomain.com/montreal etc.
My new homepage is under mydomain.com/new/index.php
I changed basically everything so I don't need a link specific redirect.
But I do want:
- every request to mydomain.com to go to mydomain.com/new/index.php
- every direct request to an old page e.g. mydomain.com/web/house/house1.php to go to mydomain.com/new/index.php
- but every request to my other webpages like mydomain.com/newyork to be unaltered.
1) What should my .htaccess look like?
Would this do the trick?
redirect 301 /index.php http://www.mydomain.com/new/index.php
redirect 301 /web/ http://www.mydomain.com/new/index.php
2) And if I put the .htaccess in the root (mydomain.com) do I also need to put a index.php file in the root?
(If so, what should it contain?)