Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Redirect to old website


Go to End


5 Posts   1501 Views

Avatar
Funfair77

Community Member, 49 Posts

4 May 2010 at 8:14am

Hello readers,

I have a question about redirect the visitor to an folder with my old website. The visitor sees the old website, and I have the time to develop the new site with SS.

I did
I made a back-up of my old website and put it in a folder named OLDSITE in the root of my server.
I installed SS also in the root. But now for the time being I want that the visitors go straight to the old website.

This goes wrong:
I put a php redirect script, but this script is overruled by the .htacess file.
Rename index.php SS file to index2.php nope

After hours of searching I can't find the solution. Please help.
Thank you.

Marnix

Avatar
3dgoo

Community Member, 135 Posts

4 May 2010 at 12:18pm

I would recommend doing the opposite.
Keep the old site in the root of the server (not in a folder). And I would put the Silverstripe site into a folder like /newsite.

Then you don't have to mess around with redirecting people.

All you need to do when you want to make the Silverstripe site "live" is delete or move the oldsite, and the move the Silverstripe site into the root folder, and then change .htaccess RewriteBase line to RewriteBase /

Avatar
Funfair77

Community Member, 49 Posts

4 May 2010 at 8:47pm

Edited: 04/05/2010 8:49pm

Hello Ampedup,

This solution sounds nice, but will this not create some new problems?

- Url's, after moving the SS site to the will the links in BE & FE still work?
- Will the installed extentions/modules still work, does they have still a good conection?
- Are the used graphic files good linked in FE & BE?

My .htaccess file disappears in my ftp program, how can I change the RewriteBase line if I can't see/download the file.

Thank you in advance!

Marnix

Avatar
3dgoo

Community Member, 135 Posts

5 May 2010 at 11:58am


This solution sounds nice, but will this not create some new problems?
- Url's, after moving the SS site to the will the links in BE & FE still work?
- Will the installed extentions/modules still work, does they have still a good conection?
- Are the used graphic files good linked in FE & BE?

I don't know what BE or FE stands for, but internally all the links in site should work just as before. The modules should work just as before because they go with site in the move. Same with the graphic files.


My .htaccess file disappears in my ftp program, how can I change the RewriteBase line if I can't see/download the file.

That sucks. What you could do is get/create a .htaccess file on your computer and upload that.

Also, have you thought about developing sites on your local machine, and then uploading them to the live site when they are done? To do this you need something like XAMPP:
http://en.wikipedia.org/wiki/XAMPP#Use
http://www.apachefriends.org/en/xampp.html

This allows your computer to act like a server so it can process php and you can develop locally. Give it a read if you are curious.

Avatar
Funfair77

Community Member, 49 Posts

6 May 2010 at 7:57pm

Hello Ampedup,

Thnx again for your reply.

I installed a new FTP program so now I can see/download/change the .htacess file.
So I go for the first option. Develop the site in an other folder and move it to the root.

Your solution to develop it on my local computer is very interesting, I give it a little research.

have a nice day,

Marnix

ps.
BE= BackEnd
FE= FrontEnd