Htaccess File

alunys/memento/develop/public/.htaccess

ENV, GET, HTTP_USER_AGENT, POST, PUT, QUERY_STRING, REQUEST_FILENAME, REQUEST_URI
RewriteEngine On
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Methods: "GET,POST,PATCH,OPTIONS,DELETE,PUT"
Header set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

### If the request contains the _escaped_fragment_ query parameter, set a flag to proxify the request to SEO4Ajax
RewriteCond %{ENV:PROXIFY} !true
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} _escaped_fragment_= [NC]
RewriteRule .* - [E=PROXIFY:true,E=REQUEST_PATH:%{REQUEST_URI}]

### If the request is issued by another known bot, set a flag to proxify the request to SEO4Ajax
### Note: the 5 following lines can be commented if you are using #! URLs
RewriteCond %{ENV:PROXIFY} !true
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_USER_AGENT} !(googlebot|bing|msnbot|yandexbot|pinterest.*ios|mail.ru|seznambot|screaming) [NC]
RewriteCond %{HTTP_USER_AGENT} (bot|spider|pinterest|crawler|archiver|flipboardproxy|mediapartners|facebookexternalhit|quora) [NC]
RewriteRule .* - [E=PROXIFY:true,E=REQUEST_PATH:%{REQUEST_URI}]

### Proxify the request to SEO4Ajax
RewriteCond %{ENV:PROXIFY} true
RewriteRule ^(.*)$ http://api.seo4ajax.com/e89456f447569f56672d5a487cc06bde%{ENV:REQUEST_PATH} [P,QSA,L]

# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
RewriteBase /
Exit mobile version