.htaccess

Understanding htaccess Filesmatch code

泪湿孤枕 提交于 2020-01-14 11:41:06
问题 I am trying to install drupal in a subdirectory on my bluehost hosted website... It's a HUGE pain I'm thinking the following lines from the .htaccess is the problem. When I currently navigatoe to mysite.com/subdir/install.php I get a 403 error. However, when I take out "deny" from the lines below, I cease to get that error, so I suspect that this line is causing all the trouble. My question is, can someone help me understand what is happening in the following code? Especially if you can break

Android Chrome Data Saver causing website issues

你说的曾经没有我的故事 提交于 2020-01-14 10:42:27
问题 We recently developed a website and deployed to live. Only for Android phones, in the Chrome Browser with Data Saver turned on (which is the default setting), the website is facing a lot of issues. One of the issues was that the user is not getting logged in after registration. Ideally, the user should be immediately logged in after registering on the website. But, with Data Saver on, after register, the user is still logged out and you have to manually login again. Could it be because the

Prevent executing .htaccess of parent folder

余生长醉 提交于 2020-01-14 10:28:10
问题 I have two different sites on same domain for example: First site in the root directory http://example.com/ Second site in subfolder http://example.com/site2/ Each site have his own .htaccess When i enter to second site ( http://example.com/site2/ ), in log of mod_rewrite i see that apache trying to execute .htaccess of first site ( http://example.com/ ). So, the question is how to prevent this? Thanks 回答1: http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions inherit This

net::ERR_INCOMPLETE_CHUNKED_ENCODING

狂风中的少年 提交于 2020-01-14 07:16:48
问题 I use .htaccess to rewrite url from someurl.com/ to someurl.com/public/. First .htaccess in www root contains this: DirectoryIndex ./public/ RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ ./public/$1 [QSA] and second one in folder /public/ contains this: DirectoryIndex _main.php RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ ./?params=$1 [QSA] And the problem is when I open

net::ERR_INCOMPLETE_CHUNKED_ENCODING

感情迁移 提交于 2020-01-14 07:15:01
问题 I use .htaccess to rewrite url from someurl.com/ to someurl.com/public/. First .htaccess in www root contains this: DirectoryIndex ./public/ RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ ./public/$1 [QSA] and second one in folder /public/ contains this: DirectoryIndex _main.php RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ ./?params=$1 [QSA] And the problem is when I open

htaccess mod_rewrite no duplicate content

社会主义新天地 提交于 2020-01-14 05:41:10
问题 I have written a rewrite rule to get all pages looking like dealer_listings.php?territory=arizona to be accessible like this wholesale-parts/arizona/ I would like the ugly url to redirect to the seo friendly one as well. Options -MultiViews RewriteEngine on <FILES .htaccess> order allow,deny deny from all </FILES> RewriteRule ^([^/\.]+)/+([^/\.]+)/([^/\.]+)/?$ bussiness_profile.php? what=$1&type=$2&dealer=$3 [L] rewriterule ^wholesale-parts/([^/\.]+)/?$ dealer_listings.php?territory=$1 [R=301

How to I add a wildcard subdomain redirect to a subdirectory in htaccess?

不羁的心 提交于 2020-01-14 05:05:13
问题 My old subdomain urls look something like: www.newyork.website.co.uk I want to redirect it now to: www.website.com/city/newyork However I have over 2,000 cities and just want to add a wildcard redirect. How do I go about doing this in my htaccess file? e.g. www.*.website.co.uk redirects to www.website.co.uk/city/* THis is so far over myhead but this is what I have tried to muddle together: RewriteEngine On RewriteCond %{HTTP_HOST} !^domain\.co.uk$ [NC] RewriteRule ^(.*)$ http://www.domain.co

Redirect HTTPS to HTTP if querystring parameter is absent via htaccess

对着背影说爱祢 提交于 2020-01-14 04:48:25
问题 I would like to redirect HTTPS to HTTP only if the following querystring parameters are absent: https://www.example.com/index.php?p=login https://www.example.com/index.php?p=signup https://www.example.com/index.php?p=cart https://www.example.com/index.php?p=one_page_checkout That is, any querystring other than these should redirect from HTTPS to HTTP. I want to make sure only my checkout path is HTTP. Can this be done simply using .htaccess with RewriteCond and RewriteRule ? 回答1: Add this to

Error 500 with .htaccess edits but mod_rewrite is loaded [closed]

瘦欲@ 提交于 2020-01-14 04:47:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . as of title, I'm having problems with my .htaccess file, everything should be set fine, but has I write something as basic as RewriteEngine on it starts giving me that nice 500 Internal Server Error. I'm hosting on localhost on an Apache server (UNIX) Obviously I triple checked that everything is set fine, and

generic non-www to www, and non-http to https

≡放荡痞女 提交于 2020-01-14 04:34:08
问题 I have the following code for my .htaccess file that I've picked up from here and tried adapting it as I understand from .htaccess, yet I can't seem to get it to work (or maybe the browser has cached it but I can't seem to clear it). Options -Indexes Options +FollowSymlinks <IfModule mod_rewrite.c> ########## FORCE SSL ########## RewriteEngine On RewriteBase / # Non-secure requests to www.domain.com should redirect to https://www.domain.com RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST}