.htaccess

Redirect all the data served by https to http

不羁岁月 提交于 2020-01-24 12:33:11
问题 So, here is the situation: We are running a website which is powered by Drupal. Sometime ago, it was decided that the website should be served as SSL. The settings to redirect the site from http to https was done by a guy who is not with us anymore. I can see in the .htaccess file the following lines #Redirect http to https RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://docs.dev.domain.com/$1 [R,L] mydomain.com points to the root of the LAMPP server and my site is

Redirect all the data served by https to http

六月ゝ 毕业季﹏ 提交于 2020-01-24 12:33:06
问题 So, here is the situation: We are running a website which is powered by Drupal. Sometime ago, it was decided that the website should be served as SSL. The settings to redirect the site from http to https was done by a guy who is not with us anymore. I can see in the .htaccess file the following lines #Redirect http to https RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://docs.dev.domain.com/$1 [R,L] mydomain.com points to the root of the LAMPP server and my site is

How to remove php extension and also redirect extensions to no extension form

妖精的绣舞 提交于 2020-01-24 07:46:50
问题 How can I have this in my htaccess: /page.php => redirects to /page /page => shows the page.php /index => redirects to root And how to remove trailing slashes from all URLs, specially the root one? Although, I'm not familiar enough with Apache configs, but I could find these codes: # To remove .php extension RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] # To remove trailing slashes RewriteRule ^(.*)/$ /$1 [L,R=301] # To redirect

How to remove php extension and also redirect extensions to no extension form

跟風遠走 提交于 2020-01-24 07:46:08
问题 How can I have this in my htaccess: /page.php => redirects to /page /page => shows the page.php /index => redirects to root And how to remove trailing slashes from all URLs, specially the root one? Although, I'm not familiar enough with Apache configs, but I could find these codes: # To remove .php extension RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] # To remove trailing slashes RewriteRule ^(.*)/$ /$1 [L,R=301] # To redirect

How to remove php extension and also redirect extensions to no extension form

这一生的挚爱 提交于 2020-01-24 07:46:05
问题 How can I have this in my htaccess: /page.php => redirects to /page /page => shows the page.php /index => redirects to root And how to remove trailing slashes from all URLs, specially the root one? Although, I'm not familiar enough with Apache configs, but I could find these codes: # To remove .php extension RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] # To remove trailing slashes RewriteRule ^(.*)/$ /$1 [L,R=301] # To redirect

Regular expression to match russian, allow all cyrillic characters in .htaccess

坚强是说给别人听的谎言 提交于 2020-01-24 05:30:05
问题 How do i redirect url with russian slug to specific php page. For example I have this url. http://www.example.com/основной-момент.htm and want to redirect to this one in .htaccess http://www.example.com/category.php?slug=<russian slug> 回答1: If it's allowed in your server you could try something like this for the specific page in your .htaccess file: RewriteEngine On RewriteRule ^основной-момент.htm$ category.php?slug=ru In Regex if the character set is enabled on your server you should be

Redirect all HTTP urls to HTTPS for frontend in magento

こ雲淡風輕ζ 提交于 2020-01-24 01:09:08
问题 I want to redirect all http urls to https in magento, but for front-endonly. In magento we have a setting to use secure urls for front-end as explained in this link: https://www.siteground.com/tutorials/magento/magento_ssl.htm but that applies to only pages shown after login or checkout. I have applied following code in my .htaccess file: RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L] It is working ok, but it is redirecting Admin panel urls to https as well. I

Securely storing private images

人盡茶涼 提交于 2020-01-23 22:00:26
问题 I am in need of a secure solution for storing a larger (unknown) amount of private images accessed only by a certain user. This question is not surrounding things like logins, sessions or anything like that - solely surrounding images and them being stored. I'll start out with explaining what I am trying to achieve and then go on to things I've thought about doing. Private images only accessible by a certain user A user logs in to my site to upload and view images provided and uploaded by him

Exception with .htaccess (image broken)

感情迁移 提交于 2020-01-23 17:40:20
问题 I'm using: RewriteRule ^(.*)$ index.php?abrir=$1 RewriteRule ^(.*)/(.*)/(.*)$ index.php?abrir=$1&id=$2&pagina=$3 and I have the image link: /data_livro/capa_livro/af58e898f91509b.jpg How I can add a exception for show the image? Its broke... My full .htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)$ index.php?abrir=$1 RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?abrir=$1&id=$2&pagina=$3 RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L] ErrorDocument 400 index

Laravel Deployment on Shared Hosting - 404 Error

喜夏-厌秋 提交于 2020-01-23 17:29:45
问题 I am trying to deploy my laravel 5.1 application on shared hosting cpanel. But I am getting 404 error. 404 Not Found The resource requested could not be found on this server! To upload the project, I make a clone of project directory and uploaded it on cpanel via their FileManger. Then move the Public folder items into Public_Html. My .htaccess file content is shown below: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On RewriteBase / #