.htaccess

AH01630: client denied by server configuration .htaccess

血红的双手。 提交于 2021-02-11 13:50:22
问题 I'm having this error, and i can't solve it. I type tail -f /usr/local/apache/logs/error_log on cpanel terminal and I receive the following error: [authz_core:error] [pid 10250] here's my .htaccess code: <IfModule authz_core_module> Require all granted </IfModule> <IfModule !authz_core_module> Require all denied </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> I'm not

.htaccess redirect non-existing pages only, keeping the token

一笑奈何 提交于 2021-02-11 13:00:26
问题 I want to redirect www.domain.com/abc to www.domain.com/index.php?a=abc only if the folder abc doesn't already exist. How should I write the .htaccess file? 回答1: Try RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ http://www.domain.com/index.php?a=$1 [L] 来源: https://stackoverflow.com/questions/13264690/htaccess-redirect-non-existing-pages-only-keeping-the-token

.htaccess redirect non-existing pages only, keeping the token

自作多情 提交于 2021-02-11 13:00:04
问题 I want to redirect www.domain.com/abc to www.domain.com/index.php?a=abc only if the folder abc doesn't already exist. How should I write the .htaccess file? 回答1: Try RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ http://www.domain.com/index.php?a=$1 [L] 来源: https://stackoverflow.com/questions/13264690/htaccess-redirect-non-existing-pages-only-keeping-the-token

See apple-app-site-association file in .well-known directory despite RewriteCond

早过忘川 提交于 2021-02-11 12:33:55
问题 In my sites hosted on Dreamhost, the .well-known directory contains an acme-challenge folder along with an .htaccess like this: # Permit access to the challenge files but nothing else Order allow,deny Allow from all RewriteCond %{REQUEST_URI} ^/[.]well-known/acme-challenge/[a-zA-Z0-9_-]+$ RewriteRule .* - [L] RewriteRule .* - [F] Therefore when I put my apple-app-site-association file into .well-known , it isn't seen. How would I modify the .htaccess to permit this? Would I just stick in

Apache 403 (Forbidden) on subdirectory on Windows

一世执手 提交于 2021-02-11 12:09:52
问题 So yesterday i installed Apache 2.2, PHP 5.3, and MySQL on my Windows 8 Machine. I am using the same vhost / .htaccess files on both but it works on my Mac and not Windows. Basically When i go to "mysite.dev" it renders the homepage of the site, but once i go to any page, such as "mysite.dev/about/" i get a 403 Forbidden Error. I have verified that Apache runs as "System" on my computer and then made sure all permissions from the site folder to root are set to Full Access for the user/group

How to redirect a URL and then rewrite it to same url with htaccess but from the root?

回眸只為那壹抹淺笑 提交于 2021-02-11 12:07:52
问题 This code below for rewrite/redirect from localhost/moneyworld/exchange?title=BTC_PMUSD to localhost/moneyworld/BTC_PMUSD but i want to rewrite/redirect from www.domain.com/exchange?title=BTC_PMUSD to www.domain.com/BTC_PMUSD Without also /moneyworld/ RewriteEngine ON RewriteCond %{THE_REQUEST} \s/(moneyworld)/exchange\?title=([^\s]*)\s [NC] RewriteRule ^ /%1/%2 [NE,QSD,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/([^/]+)/?$ /moneyworld

How to redirect a URL and then rewrite it to same url with htaccess but from the root?

你离开我真会死。 提交于 2021-02-11 12:05:10
问题 This code below for rewrite/redirect from localhost/moneyworld/exchange?title=BTC_PMUSD to localhost/moneyworld/BTC_PMUSD but i want to rewrite/redirect from www.domain.com/exchange?title=BTC_PMUSD to www.domain.com/BTC_PMUSD Without also /moneyworld/ RewriteEngine ON RewriteCond %{THE_REQUEST} \s/(moneyworld)/exchange\?title=([^\s]*)\s [NC] RewriteRule ^ /%1/%2 [NE,QSD,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/([^/]+)/?$ /moneyworld

Bypass .htaccess login when user has a specific cookie SetEnvIf

感情迁移 提交于 2021-02-11 09:17:55
问题 This is how my .htaccess looks like: AuthType Basic AuthName "FORBIDDEN AREA" AuthUserfile "../htdocs/site/.htpasswd" AuthGroupFile / Require valid-user #Allow valid-user Order Deny,Allow Deny from all SetEnvIf HTTP_COOKIE my_cookie_name norequire Allow from env=norequire Satisfy any My user has a cookie, and if his cookie has a name "my_cookie_name" I would like that he bypasses the .htaccess login (authentication) so that he doesn't need to enter his username and password. I tried with

Dynamic URL based htaccess

六眼飞鱼酱① 提交于 2021-02-11 08:20:47
问题 I am stick in a situation of a websites URL. Here I am describing it using an e-commerce site. Product Categories Women ------> womens-clothing (sub-category) ---------> womens-top (child) ---------> womens-dress (child) public_html is the root directory. I want to create URLs like this --> Case 1 -> If user wants to view all the products under a sub-category (say Womens-clothing ). Then I want the URL to be www.website.com/womens-clothing/(may be some parameters here) . Case 2 -> If user

Dynamic URL based htaccess

為{幸葍}努か 提交于 2021-02-11 08:18:07
问题 I am stick in a situation of a websites URL. Here I am describing it using an e-commerce site. Product Categories Women ------> womens-clothing (sub-category) ---------> womens-top (child) ---------> womens-dress (child) public_html is the root directory. I want to create URLs like this --> Case 1 -> If user wants to view all the products under a sub-category (say Womens-clothing ). Then I want the URL to be www.website.com/womens-clothing/(may be some parameters here) . Case 2 -> If user