skip to Main Content

301 redirect folder root – Apache

I'm struggling with a fairly simple 301 redirect. I have several redirects for pages which all work fine - eg Redirect 301 /folder/mypage1.html https://www.example.com/folder/mypage2.html. However now I want to redirect from a folder root to another page, I don't however…

VIEW QUESTION

Wrong condition getting successful in PHP file – Apache

I have made a simple API through PHP to provision and check connection to server. Here is the Code: <?php ini_set('display_errors', 1); session_start(); require_once("common.php"); $api_get="*******************"; $api_post="**********************"; if (isset($_GET["apikey"])){ if ($_GET["apikey"]=="$api_get"){ // Takes raw data from the request $json = file_get_contents('php://input');…

VIEW QUESTION

Cut Apache virtual host block

I'm trying to cut certain virtual host from file which has a lot of them using bash. Eg. in my script I would like to get virtual host which uses the_one_known2.example.com, but another time the_one_known3.example.com, namely I would like to…

VIEW QUESTION

.htaccess redirects too many times – Apache

I have written a .htaccess for the subdomain but it redirects too many times. my complete code looks like RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ http://subdomain/$1 [R,L] RewriteEngine On RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$…

VIEW QUESTION
Back To Top
Search