People who code: we want your input. Take the Survey

Questions tagged [apache]

The Apache HTTP Server is an Open Source Web server, which originated from a series of patches to the NCSA HTTPd. Apache is the world's most popular Web server, which is run on 54.90% of all Web servers according to the Netcraft survey conducted July 2010.

Filter by
Sorted by
Tagged with
1
vote
1answer
18 views

PHP file not running using XAMPP

I recently installed XAMPP v.3.2.2. I have since been trying to test if PHP is properly configured by Apache. But I keep getting this error every time I try to run any PHP file. I have stored the ...
2
votes
2answers
58 views

Do short URLs obligate 301 redirects?

Some content management systems such as WordPress and Drupal have Short URLs by default (if the webserver allows it), but at least one other --- MediaWiki, doesn't. Before I continue with the process ...
1
vote
1answer
86 views

A modern global rewrite command for HTTPS websites without cname (www.) at all

I host a MediaWiki website on a shared server with Apache, MySQL and PHP. Up until today I used a CDN to deliver that website's content --- which required redirecting each webpage to a www. including ...
0
votes
1answer
29 views

Can I ban IP based on page GET then instant POST? (Spambots)

While there are lots of rules to id and ban spambots, e.g., Fail2Ban rules, it's always a cat-and-mouse chase. Nothing's perfect. Then it hit me. The one thing they always do is get a page, then ...
1
vote
1answer
33 views

Safe way to block unwanted bots without potential impact on good ones

Currently, I have blocked several bots in htaccess (apache 2.4) like this. (Have used imaginary bot names in the below example.) SetEnvIfNoCase User-Agent .*abcbot.* bad_bot SetEnvIfNoCase User-Agent ....
1
vote
1answer
38 views

Can I use the .htaccess file or another solution to address www and non-www duplicate content issues?

Ahrefs is returning a series of duplicate content URLs for my own website i've asked them about and which they've said needs to be addressed on the CMS side, and which they cannot help with. The ...
3
votes
1answer
53 views

Redirect URL ending in certain `variable=value` query string, to `URL?variable` (i.e., strip `=value`)

I'm trying to create a 301-rewrite for URLs ending with ?amp=1 to nearly the same URL and query string, just stripping the value (=1). Examples: https://example.com/?amp=1 should redirect to https://...
1
vote
1answer
41 views

How can I run commands in my system using a website running on my local server?

I set up an Apache server on my system. I want to run commands and files using the website running on my local system. How do I trigger a file running using browser? What i want to do: I have a file ...
1
vote
2answers
50 views

How to remove all .html extensions from all pages of site running under Apache?

On a shared hosting environment based on CentOS-Bash, Apache (with Nginx as a "reverse proxy"), PHP and MySQL I host a MediaWiki website. Normally, no webpage has a .html extension. I have ...
3
votes
1answer
45 views

IIS rewrite rules for SEO friendly URLs don't work in .htaccess for Apache

I'm using a Pi 3 for the Apache server but I can't figure out how to setup .htaccess. Previously I used IIS with which it is easy to implement SEO-friendly URLs. Linux .htaccess is very different and ...
1
vote
0answers
47 views

SEO - Google select a another domain at canonical url

I have a problem with my domain for selected canonical url by google. I have a vps for my website with apache. I created a redirect for website ip, but some domains have my ip in DNS and redirect to ...
1
vote
1answer
44 views

How do I make my home web server public when port 80 is forwarded with my CenturyLink router?

I have the latest version of Apache Lounge, and I want to make it accessible to the other people. My Website IP is 192.168.0.61, and in httpd.conf these are the settings I added Listen 192.168.0.61:80 ...
1
vote
0answers
31 views

What can be a reason of a “The requested URL / was not found on this server” error in case of an addon domain? [closed]

Let's say I have a site hosted on a.example.com. I'm adding an addon domain to the server (shared hosting): b.example.com and point this domain to the server IP address. Visiting b.example.com ...
2
votes
0answers
42 views

Prevent search engines from crawling and indexing all domains and subdomains set up under an Apache server

My company is renting a CentOS server, with one main domain and ~30 subdomains (the number varies, but it's usually around 30) hosted on it. The subdomains themselves are used for various purposes (...
2
votes
1answer
383 views

Redirect from index.html to its directory using .htaccess?

For each page of my website, it is named index.html and stored inside a folder of the name of the page. example.com/ serves example.com/index.html example.com/about/ serves example.com/about/index....
1
vote
1answer
22 views

Subdomain rewrites without using certs that don't support sub domain affecting

I am using LetsEncrypt to generate and renew my certs for my website. Unfortunately, it does not support subdomains. Having said that, I have a ton of rewrite rules that work fine. For example: ...
1
vote
1answer
55 views

Htaccess - replacing a query string with a numeric value

I don't know why but this htaccess item doesn't work for me. I have something like this after update user profile public/user_profile/show_user.html?id=4 and I want to have public/user_profile/...
0
votes
0answers
12 views

Pages viewable stacked on top of one another? [duplicate]

I've asked this before but couldn't find my old account. I'm trying to figure out why my webpages are being stacked on top of one another in my control panel. I think it's a scraper doing the return ...
2
votes
1answer
62 views

How can I rewrite all Files to the Index Folder and also Remove the Extensions

I've been looking for a solution for a few hours now, and I'm struggling to understand why the Regex doesn't act like Regex... If you just try to match a letter, it doesn't match a letter, and I can't ...
2
votes
1answer
33 views

Apache doesn't redirect subfolders

I'm having trouble configuring my Apache server through the .htaccess file. I want to redirect all request from my domain (example.com, www.example.com, example.com/folder1/folder2) to my new domain (...
1
vote
1answer
103 views

PHP Undefined index: REDIRECT_STATUS - error 404

Custom 404 page in PHP using .htaccess file. If page dosen't exist redirect to error.php. I don't know why but it doesn't work. Notice: Undefined index: REDIRECT_STATUS on line 2 <?php $error = $...
1
vote
1answer
97 views

Htaccess RewriteCond based on environment variable

I find apache very unfriendly. Anyway. I have this: RewriteRule (.*) - [QSA,E=DOMAIN_NAME:localhost.com] This doesn't redirect, which is fine: RewriteCond "www.%{ENV:DOMAIN_NAME}" "!=...
1
vote
1answer
23 views

What's the difference between access and access plus in ExpiresByType directive?

I have seen: ExpiresByType image/jpg "access 1 year" But also: ExpiresByType image/jpg "access plus 1 year" So, what's the difference between those two lines ?
1
vote
1answer
17 views

What types of files does ExpiresDefault include?

I have: ExpiresActive On ExpiresByType image/jpg "access 1 years" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType image/gif ...
4
votes
1answer
40 views

Mod Rewrite Multiple Query String

I'm having trouble using modrewrite to redirect a URL with multiple strings. I have a PDF handling script. I want to redirect something like: https://www.example.com/pdfs/samplepdf.pdf/open [or /...
2
votes
2answers
49 views

Excluding homepage from Rewrite rules in htaccess

I would like to have this new prerendering service I'm using NOT apply its magic to the homepage and basically only to pages that begin with https://thechartcast.com/episodes/. Below is the relevant ...
2
votes
0answers
69 views

How can I keep WordPress files in sync on two servers behind a load balancer?

I have two Amazon Linux web servers with an Amazon Load Balancer, and I want to use WordPress to display content at the document root level only. The site has other subdirectories with PHP files that ...
1
vote
1answer
60 views

Apache not accessible from outside local network

I can only connect to my Apache server using devices on the local network and not from the outside. I think that this is a port forwarding issue, as I'm getting a Connection Timed Out for the port ...
1
vote
1answer
50 views

Clean URL's within subdirectories

I have a website with the following structure index.php contact.php about.html forum(dir) - index.php - thread.php What i want my htaccess to do Remove .php & .html extension, eg: when you ...
1
vote
0answers
24 views

Invalid command 'SSLEngine', with “--enable-ssl” configured Apache

I built an Apache 2.2.32 server on Ubuntu from sources, and if I test my phpinfo() I see: './configure' '--prefix=/usr/local/php_7.2.25' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysqli=/usr/...
1
vote
1answer
320 views

How can I modify the DNS nameservers on aaPanel

Where can I navigate the DNS server on aaPanel platform because I just want to modify it? Thanks in advance.
2
votes
1answer
28 views

Four 301-redirects from “www.example.com” to “shop.example.com” (am I losing my Google PageRank?)

Some years ago, I started my website with the main domain www.example.com. However, the project ended up being a store under shop.example.com. I obtained hundreds of links to http://www.example.com, ...
0
votes
0answers
14 views

GA UTM tag sends user to Apache test page

Added Google Optimize to a website in order to do A/B redirect testing. All working fine except when a user searches for the site using specifically Google: They land on either a/b page for a split ...
1
vote
1answer
34 views

How do I permanently remove all deleted pages Google (only the home page should remain)?

Google seems to have many pages in its index that I deleted years ago. My site currently has only the home page at example.com/index.html. What do I do in Apache to permanently remove all those ...
1
vote
0answers
295 views

Certbot challenge error 404 in webroot mode

This web site runs under Apache on Windows. I installed Windows certbot client and ran it as suggested on its homepage, in webroot mode, since the web site cannot be stopped. This is what it reported: ...
1
vote
1answer
286 views

Rewrite URL with ID to one file using .htaccess

I have "home" directory as: /var/www/page I need redirect: /var/www/page/index/product/id/9098890 Where 9098890 is the id of product. to one file: /var/www/page/script/index.php I want ...
1
vote
1answer
50 views

Will a .com SSL certificate cover a redirecting .com.ar domain?

we have a website with 2 different domains: www.example.com or example.com and www.example.com.ar or example.com.ar I want all requests redirected to www.example.com. I know I have to create two ...
0
votes
0answers
50 views

mod_headers check for existence of multiple cookies and perform a function only on those cookies

I have a requirement on Apache 2.4 wherein I'd like to check for specific cookies and set the HTTPOnly plus Secure flags only on those Cookies and ignore other Cookies. E.g. On browser I have the ...
1
vote
1answer
69 views

Remove PHP extension from URLs such that the URLs work with or without a trailing slash

My directory structure is - Assets - Dashboard - index.php - account.php index.php about.php verify.php What I basically want it to be: Remove the .php extension for example http://example.org/...
1
vote
2answers
98 views

How to parse Apache access log for 404s not from bots?

The regex is easy for 404s in a typical Apache log: grep ' 404 ' access_log But many are coming from bots, which I don't care about. I'm looking for actual people hitting 404s. So I'm trying to ...
1
vote
2answers
135 views

How to redirect some URLs to another local port with .htaccess?

I have the .htaccess file in the root public_html directory. It contains the following: Options -Indexes Redirect / /dali RewriteEngine on RewriteRule ^api/(.*[^/])/?$ http://%{HTTP_HOST}:5000/$1 [R=...
1
vote
1answer
35 views

Apache serves .svg file without Content-type header

Apache is serving an .svg file, but the HTTP response does not have a Content-type header. Consequently, Chrome is displaying the text of the .svg file, rather than the desired image. My goal is for ...
2
votes
1answer
50 views

Configure Apache to show a custom page rather than my host's default when a user cancels logging in via basic authentication

I have a protected directory on an hosted IONOS server. It correctly works when the correct credentials are entered, but when a user hits cancel, it redirects that user to the hosting provider's promo ...
1
vote
1answer
74 views

Why I am not seeing HTTP 304 response codes in my Apache logs?

Why I am not seeing HTTP 304 response code in my Apache logs even though my webpages are sending them? I've checked this in Chrome console: My goal is to see which browsers are successfully using ...
1
vote
2answers
44 views

All pages are not being redirected to HTTPS when accessed using HTTP

I'm running a Wordpress blog that has an issue with HTTPS redirect. Except home page, no other URL is being redirected to HTTPS if you visit via HTTP. I want to redirect all HTTP traffic to HTTPS. ...
1
vote
1answer
331 views

AH00558: httpd: Could not reliably determine server's fully qualified servername error after creating VirtualHost

I have installed an Apache server in CentOS 8 and it was serving both http and https pages correctly, that is, I could view the Apache test page when connected to the server from my browser I used ...
1
vote
1answer
47 views

Flush cached selector in Adobe Experience Manager without flushing entire directory

How can I use selector based cache flushing in Adobe Experience Manager? http://example.com/content/myapp/us/en.child1.xml http://example.com/content/myapp/us/en.child2.xml Lets say,we have xml's ...
2
votes
1answer
157 views

Apache rewrite rule for parameter value to path while replacing slashes with underscores

Apache rewrite rule for, Query String replace / value with _ Source URL: http://example.com/my/service?opath=/content/home/page&appId=myapp rewrite to below http://example.com/my/service....
3
votes
1answer
47 views

In Apache make subdirectory require basic authentication while parent directory is open to the public

I want to make the contents of the directory /srv/www/dssx (mostly) public. The sub-directory /srv/www/dssx/basic-auth of /srv/www/dssx I want to protect with basic authentication. However, I cannot ...
1
vote
1answer
33 views

Sharing .htaccess files between directories on a server

I have a webserver with thousands of directories. Some need to be internal only, some need to reference specific IP addresses, some are public. These .htaccess files change from time to time with IP ...

1
2 3 4 5
23