.htaccess

Laravel: Redirect to https://www.*** does not work in Firefox?

纵然是瞬间 提交于 2020-01-17 17:01:49
问题 I added to the .htaccess file this code https://stackoverflow.com/a/13997498/2311074 to redirect my website always to https://www.********** . This works in Chrome, but it is not working in Firefox. If I enter https://example.com then its not redirecting anywhere. in Firefox. In Chrome they are correctly redirected to https://www.example.com . I aready deleted the cache and tried to call the website from other PC's but its still not working. This is my htaccess FIle from Laravel: <IfModule

htaccess http to https with www. Without redirecting sub domain

爱⌒轻易说出口 提交于 2020-01-17 11:09:36
问题 I have a RewriteRule that redirects my main domain to https://www.sta-games.com which works fine, but when I try to access my subdomain http://files.sta-games.com , it redirects to my main domain. Heres my redirect rules #HTTPS Redirection RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Can anyone see the problem? 回答1: You need to adjust your rules so

htaccess http to https with www. Without redirecting sub domain

末鹿安然 提交于 2020-01-17 11:07:27
问题 I have a RewriteRule that redirects my main domain to https://www.sta-games.com which works fine, but when I try to access my subdomain http://files.sta-games.com , it redirects to my main domain. Heres my redirect rules #HTTPS Redirection RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Can anyone see the problem? 回答1: You need to adjust your rules so

Htaccess code to remove id and title from URLs? [duplicate]

天大地大妈咪最大 提交于 2020-01-17 11:06:13
问题 This question already has answers here : .htaccess php Rewrite view.php?visopslag=(id) (2 answers) Closed 4 years ago . I have used my .htaccess file to add www. to index url , remove .php and remove ?id= from URLs. This is original url: www.site.com/article.php?id=12&title=title-text Url with .htaccess code www.site.com/article/12 This code have removed &title=title-text from url. How to remove &title= without title-text ? Like this: www.site.com/article/12/title-text .htaccess file Options

path string wise match redirection in htaccess

本小妞迷上赌 提交于 2020-01-17 10:28:17
问题 How to redirect the path using string compare. For example: We have path like (1000+ redirections) www.example.com/kb-123 www.example.com/kb-555 www.example.com/kb-666 Now using single rule how to redirect all above path's into below path's? www.example.com/article/kb-123 www.example.com/article/kb-555 www.example.com/article/kb-666 回答1: Try with below rule, RewriteEngine On RewriteCond %{REQUEST_URI} ^(.+) RewriteRule ^ /article/%1 [R=301,L] 来源: https://stackoverflow.com/questions/44269702

Ignore first variable on link using HTACCESS permalinks

Deadly 提交于 2020-01-17 08:40:27
问题 I am using this htaccess rules to create permalinks on the root folder of a domain : Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* ?url=$0 [L,QSA] Now i want to use the same rules but on a folder inside this website because i want to make it in two different languages. So if i create a folder: example.com/en/ , i want this conditions to apply same as in the root folder for calling links as below but ignoring the

.htaccess url rewrite - remove .php remove www. convert ?id=10 to /10

烈酒焚心 提交于 2020-01-17 07:38:19
问题 As the title says, I need a quite complex url rewrite mechanism for a web-app as .htaccess rule. I've searched quite a lot now and tried hundred of different rewrite rules. So, basically this is what I need: User goes to: http://www.site.com/product.php?id=12 Server should redirect to: http://site.com/product/12 Once thing to mention: not all pages do append id's. So I also have: http://www.site.com/some/page.php which then should redirect to: http://site.com/some/page or from http://site.com

Htaccess Negative Lookahead Issue

南楼画角 提交于 2020-01-17 07:00:07
问题 This is a very specific issue to my hobby website. I have this code in my htaccess: RewriteRule ^(?!assets|404|i|chats|books|forum|blog|help|terms|policy|jobs|settings|reset|signup|signin|signout)([^/]+)$ profile_home.php?userdomain=$1 [L] RewriteRule ^(?!assets|404|i|chats|books|forum|blog|help|terms|policy|jobs|settings|reset|signup|signin|signout)([^/]+)/([^/]+)$ profile_home.php?userdomain=$1&selection=$2 [L] Now this for the most works perfectly, I can visit all of those links (url/404,

Htaccess Negative Lookahead Issue

橙三吉。 提交于 2020-01-17 06:59:29
问题 This is a very specific issue to my hobby website. I have this code in my htaccess: RewriteRule ^(?!assets|404|i|chats|books|forum|blog|help|terms|policy|jobs|settings|reset|signup|signin|signout)([^/]+)$ profile_home.php?userdomain=$1 [L] RewriteRule ^(?!assets|404|i|chats|books|forum|blog|help|terms|policy|jobs|settings|reset|signup|signin|signout)([^/]+)/([^/]+)$ profile_home.php?userdomain=$1&selection=$2 [L] Now this for the most works perfectly, I can visit all of those links (url/404,

Access .htaccess protected file Android

◇◆丶佛笑我妖孽 提交于 2020-01-17 06:52:22
问题 I'd like to access a file that is protected by .htaccess in my Android app. Below is what I need to get just a file, but not .htaccess protected. I don't know where I can put my credentials... Can someone help me with adding credentials to this? Or propose another way to collect the file? Thanks in advance :) InputStream inputStream = null; URL url = null; try { url = new URL(THENEEDEDURL); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000 /*