Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

yannlombard/seoserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEO server

dirty fork of https://github.com/apiengine/seoserver

Example of config for AngularJS

Add html fragment into <head>

```html ```

Set base href <head>

```html ```

Set html5Mode & hasPrefix into module's config

```javascript angular.module('stApp', ['ngRoute']).config(function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');

$routeProvider.when('/', {

    templateUrl: 'views/main.html',
    controller: 'MainCtrl'

}).otherwise({

    redirectTo: '/'

});

});

<p>Set your navigation links start with "#!"</p>
```html
<a href="#!/detail/{{product.id}}">
<a href="#!/page">

Or, you'll find a working front here : https://github.com/yannlombard/hello-angular
Build project then host it on apache with enabled mod_rewrite & mod_proxy_http

.htaccess

catch all pages

``` ErrorDocument 404 / ```

Catch all bots

``` RewriteEngine on # keep this order ! RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_USER_AGENT} Googlebot|bingbot|Googlebot-Mobile|Baiduspider|Yahoo|YahooSeeker|DoCoMo|Twitterbot|TweetmemeBot|Twikle|Netseer|Daumoa|SeznamBot|Ezooms|MSNBot|Exabot|MJ12bot|sogou\sspider|YandexBot|bitlybot|ia_archiver|proximic|spbot|ChangeDetection|NaverBot|MetaJobBot|magpie-crawler|Genieo\sWeb\sfilter|Qualidator.com\sBot|Woko|Vagabondo|360Spider|ExB\sLanguage\sCrawler|AddThis.com|aiHitBot|Spinn3r|BingPreview|GrapeshotCrawler|CareerBot|ZumBot|ShopWiki|bixocrawler|uMBot|sistrix|linkdexbot|AhrefsBot|archive.org_bot|SeoCheckBot|TurnitinBot|VoilaBot|SearchmetricsBot|Butterfly|Yahoo!|Plukkie|yacybot|trendictionbot|UASlinkChecker|Blekkobot|Wotbox|YioopBot|meanpathbot|TinEye|LuminateBot|FyberSpider|Infohelfer|linkdex.com|Curious\sGeorge|Fetch-Guess|ichiro|MojeekBot|SBSearch|WebThumbnail|socialbm_bot|SemrushBot|Vedma|alexa\ssite\saudit|SEOkicks-Robot|Browsershots|BLEXBot|woriobot|AMZNKAssocBot|Speedy|oBot|HostTracker|OpenWebSpider|WBSearchBot|FacebookExternalHit [NC] RewriteRule (.) https://localhost:3000%{REQUEST_URI}? [QSA,L,P]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.html [L]

    RewriteCond %{QUERY_STRING} _escaped_fragment_
    RewriteRule (.) https://localhost:3000%{REQUEST_URI}? [QSA,L,P]

    RewriteCond %{HTTP_USER_AGENT} Googlebot|bingbot|Googlebot-Mobile|Baiduspider|Yahoo|YahooSeeker|DoCoMo|Twitterbot|TweetmemeBot|Twikle|Netseer|Daumoa|SeznamBot|Ezooms|MSNBot|Exabot|MJ12bot|sogou\sspider|YandexBot|bitlybot|ia_archiver|proximic|spbot|ChangeDetection|NaverBot|MetaJobBot|magpie-crawler|Genieo\sWeb\sfilter|Qualidator.com\sBot|Woko|Vagabondo|360Spider|ExB\sLanguage\sCrawler|AddThis.com|aiHitBot|Spinn3r|BingPreview|GrapeshotCrawler|CareerBot|ZumBot|ShopWiki|bixocrawler|uMBot|sistrix|linkdexbot|AhrefsBot|archive.org_bot|SeoCheckBot|TurnitinBot|VoilaBot|SearchmetricsBot|Butterfly|Yahoo!|Plukkie|yacybot|trendictionbot|UASlinkChecker|Blekkobot|Wotbox|YioopBot|meanpathbot|TinEye|LuminateBot|FyberSpider|Infohelfer|linkdex.com|Curious\sGeorge|Fetch-Guess|ichiro|MojeekBot|SBSearch|WebThumbnail|socialbm_bot|SemrushBot|Vedma|alexa\ssite\saudit|SEOkicks-Robot|Browsershots|BLEXBot|woriobot|AMZNKAssocBot|Speedy|oBot|HostTracker|OpenWebSpider|WBSearchBot|FacebookExternalHit [NC]
    RewriteCond %{REQUEST_URI} ^/index.html$
    RewriteRule (.) https://localhost:3000%{REQUEST_URI}? [QSA,L,P]
</IfModule>
```

Not supported yet

404 & 500 detections

About

Seo server for Backbone, Angular...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published