Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirects Pending - SEO Issue #13

Open
ggonzaleza opened this issue Mar 9, 2014 · 2 comments
Open

Redirects Pending - SEO Issue #13

ggonzaleza opened this issue Mar 9, 2014 · 2 comments

Comments

@ggonzaleza
Copy link

Redirect 301 of http://getpopcorntime.com to http://getpopcornti.me
Redirect 301 of http://getpopcornti.me/index.html to http://getpopcornti.me
Redirect 301 of http://getpopcornti.me/tos.html to http://getpopcornti.me/tos
Redirect 301 of http://getpopcornti.me/faq.html to http://getpopcornti.me/faq

@heyimjuani
Copy link
Contributor

@guillermoga88 thanks for reporting this.

The domain was not registered by us. We'll try to get in touch with the domain registrar and the hosting company to see how we can solve this.

@ggonzaleza
Copy link
Author

Ok, no problem :)
You can still solve the other redirects.
I wrote a .htaccess file that will be helpful. It will solve all your redirects even if you add any subfolder. Also it's using Gzip compression for improving page load speed.
I've already tested in my server. Hope it helps!
Here it is:

Options FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

#Index redirection
RewriteRule ^index.html$ / [R=301,L]
RewriteRule ^(.*)/index.html$ /$1 [R=301,L]

#Access to extensionless .html
RewriteCond %{REQUEST_FILENAME} ^index.*
RewriteRule ^([^/]+)$ $1.html
#Removing extension from future subdirectories
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(([^/]+/)*[^./]+)$ $1.html

#Redirecting extensionless .html
RewriteCond %{THE_REQUEST} ^(.+).html([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+).html$ $1 [R=301,L]

#Redirecting trailing slash /
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)/$ /$1 [R=301,L]

#Gzip Compression - text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

#Removing browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants