Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » mod_rewrite for splash page

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

Page: 1
Go to End
Author Topic: 1704 Views
  • Ben_W
    Avatar
    Community Member
    79 Posts

    mod_rewrite for splash page Link to this post

    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

  • Ben_W
    Avatar
    Community Member
    79 Posts

    Re: mod_rewrite for splash page Link to this post

    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.

  • Double-A-Ron
    Avatar
    Community Member
    603 Posts

    Re: mod_rewrite for splash page Link to this post

    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

    1704 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.