Skip to content

Project is a front-end initiative designed to provide an optimal user experience for both English and Russian-speaking audiences. This project focuses on creating a responsive and user-friendly landing page that effectively communicates the brand's message while ensuring ease of navigation and interaction for a diverse user base.

License

Notifications You must be signed in to change notification settings

TegroTON/Landing-page-tegro-projects-token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README: Tegro Landing Page Configuration

Introduction

This comprehensive README is designed for the Tegro team. It contains a detailed guide on configuring the .htaccess file for the project's landing page, enhancing security, and optimizing user experience.

.htaccess Configuration

Enhancing Cookie Security

# Implement secure cookies
# Header set Set-Cookie HttpOnly;Secure
Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure"

This configuration enforces the HttpOnly and Secure flags for all cookies, increasing security by restricting JavaScript access and ensuring transmission over encrypted connections.

Protecting Hidden Files

# Secure .htaccess and other hidden files
<Files ~ "^\.">
    Order allow,deny
    Deny from all
</Files>

This block safeguards hidden files, like .htaccess, adding an extra layer of security against unauthorized access.

URL Rewrite Mechanism

# Activate URL rewriting
RewriteEngine on

Enabling themod_rewrite module facilitates URL redirections and modifications for improved navigation and SEO.

Streamlining URL Structure

# Redirect .php URLs to cleaner versions
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1/ [R=301,L]

# Remove .php extension, add trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^\.]+)/$ $1.php

These rules are aimed at removing the .php extension from URLs and appending a trailing slash, thereby simplifying the URLs for better user experience.

Optimizing URLs for Brand Consistency

# Exclude "www" from URLs, redirect to non-www version
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Removing www from URLs ensures brand consistency and enhances SEO performance.

Intelligent 404 Error Handling

# Smart redirection for non-existent pages
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . / [L,R=301]

This setup redirects users to the homepage when they attempt to access pages that don't exist, offering a seamless user experience while maintaining site engagement.

Comprehensive Additional Configurations

Besides the main configurations, the .htaccess file includes additional settings such as cache headers, file compression activation for specific file types, and other performance-enhancing features.

Conclusion

The .htaccess file is an essential component for configuring the server behavior and setting up the landing page. This README serves as an in-depth guide for the Tegro team, assisting in understanding, implementing, and modifying configurations for optimal site performance and security.

About

Project is a front-end initiative designed to provide an optimal user experience for both English and Russian-speaking audiences. This project focuses on creating a responsive and user-friendly landing page that effectively communicates the brand's message while ensuring ease of navigation and interaction for a diverse user base.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •