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.

Customising the CMS /

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

mod_rewrite for splash page


Go to End


3 Posts   2511 Views

Avatar
Ben_W

Community Member, 80 Posts

14 April 2009 at 5:10pm

Hi

I installed the silverstripe and started working on it. Later on I have been told to put a splash page so if public visits the domain we will be able to present a simple form for subscription. Now, this page is not done with silverstripe, it is pure php file and has a process script to handle the form submission, basically seperate from the main site. What I would like to do is, only redirect user if they visit the domain, and still be able to access to /home/ and other pages that I have been working on.

I have tried following, but failed to work

RewriteCond %{HTTP_HOST} ^www.mydomain.com/$
RewriteRule ^(.*)$ http://www.mydomain.com/index.php [L]

aslo tried
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php [L]

Could someone please help, I know it is more to do with .htaccess than silverstripe

Avatar
Ben_W

Community Member, 80 Posts

14 April 2009 at 5:28pm

I have just tried the following:

RewriteRule ^$ index.php [L]

It will redirect user if they visit the domain, and I am able to view other pages, except for /home/, /home/ will be redirected to index.php page. not sure why.

Avatar
Double-A-Ron

Community Member, 607 Posts

14 April 2009 at 7:46pm

Edited: 14/04/2009 7:49pm

Before you waste any more time on this, the advice you have been given is bad.

In most cases, splash pages are terrible for SEO (Search Engine Optimization) as they lack decent content that search engines look for, and are rarely the type of pages that other sites want to link to (and you want sites to link to your root domain).

Have a read of this and try "splash page seo" in Google for more writeups on this very old practice.

http://www.seohosting.com/blog/articles/seo-and-splash-pages/

If you are really decided on doing this, just say so and someone will be able to help you with the tech aspects of the problem. But I highly recommend that you don't use splash pages on the root page of your domain. ESPECIALLY if it contains flash.

Cheers
Aaron