Invoking .htaccess file


#1

Can anyone help me with the set up of the .htaccess file to redirect my site while under development? I have created a file with the following commands as recommended and placed it in /premiumyarn.com

Options +Indexes
Redirect /premiumyarn.com/ http://premiumyarn.com/index_old.html
Redirect /premiumyarn.com/index http://premiumyarn.com/index_old.html
Redirect /premiumyarn.com/index.php http://premiumyarn.com/index_old.html

Each full Redirect command is on it’s own line in the file. How is the command file initiated? It does not seem to be working.


#2

Those rewrite rules would redirect:

http://premiumyarn.com/premiumyarn.com/ -> http://premiumyarn.com/index_old.html
http://premiumyarn.com/premiumyarn.com/index -> http://premiumyarn.com/index_old.html
http://premiumyarn.com/premiumyarn.com/index.php -> http://premiumyarn.com/index_old.html

This is probably not what you want. Remove the “/premiumyarn.com” from each line, so the second one (for instance) is simply:

Redirect /index http://premiumyarn.com/index_old.html

#3

I can do this with my htaccess correct since i started with youarethescene.net domain
and shorten the url i bought recently a yats.cd correct?

I can point the long url to the short one, cause im getting loads of lag, and apparently my yats.cd isn’t config for apache. I’ve been told to redirect it


#4

If you’re trying to redirect the whole domain, you’d do better to just configure the domain as a redirect through the DreamHost Panel.


#5

I tried the “redirect” through the DH panel…it did not work (or maybe I entered the wrong path. I will try again.


#6

I think Andrew’s advice on panel redirection was in response to youarethescene (who has a different redirection problem).

All your targets appear to be index_old.html - do you just want to redirect everything to one particular target file (like in a temporary maintenance mode situation) while you further develop your website?


#7

I think Andrew’s advice on panel redirection was in response to youarethescene (who has a different redirection problem).

All your targets appear to be index_old.html - do you just want to redirect everything to one particular target file (like in a temporary maintenance mode situation) while you further develop your website?

“YES!!!”


#8

Then you need one line:

The 503 code indicates a ‘Service Unavailable’ status (so Google et al will check back later).


#9

I put this one line in and it broke everything…back to square one…[hr]

THIS WORKED!!! THANK YOU, THANK YOU, THANK YOU!


#10

Server’s being pedantic.

302 = temporary redirect - not really the correct code for this purpose.


#11

This code gave me an error page with no code stating: “too many redirects occurred trying to open the files. This might occur if you redirect a page to a page that redirects a page to the original file”

I also tried:
Redirect /index http://premiumyarn.com/index_old.html
Redirect /index.php http://premiumyarn.com/index_old.html

This actually worked to display the html page I created to say the site was under development. The problem was when I logged into the WebAssist Store Manager and used the Design menu, it also initiated code to display the index_old.html and therefore I can’t design the pages (although I could use the other features of the Store Manager). Is there an easy way I can set up a development environment and test it without touching the live site? I am desperate to find something that works for me!