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
3
votes
2answers
24 views

How does the server remember logged in users on a password protected website via .htaccess?

So basically my question is just a technical one. We password protect our development server so that no duplicated content appears to google if we mirror an existing website. How does the server ...
2
votes
2answers
41 views

Apache maintenance page htaccess without being overriden by subfolder

I want to perform a maintenance on my website, so wrote an htaccess (I do not own the server) to redirect users to a specific page. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{...
1
vote
0answers
21 views

Browser appends a '?' to links on page, but the '?' does not appear in the source [closed]

I'm a little puzzled with the following problem: When I hover over a link a WordPress site I'm looking after, I can see that the URL is https://xxxxxxx.com/apply-now/? All the links on the page have ...
0
votes
1answer
23 views

System to distribute update files [closed]

I'm a bit new to the web side of programming. Can I use Apache for file hosting and recording of clients that download a file? I need to distribute update files to clients and want to record client ID'...
2
votes
1answer
55 views

Why can't I access an Apache web server on a local network with my phone?

I have a website that needs to work only on my local network, I am hosting it on Apache, I have already done all the steps to make it accessible from any PC and laptop, but for some reasons if I try ...
2
votes
1answer
42 views

Why is this htaccess evaluating to 302 redirect instead of internal rewrite?

As an example, I was expecting this https://example.software/credits to evaluate to an internal rewrite https://example.software?mode=credits Why is it showing up on the browser url-bar as a 302 ...
0
votes
0answers
21 views

X-Robots-Tag across Multiple URL

I need to add X-Robots-Tag in my Apache config where it can be applied to multiple URLs which are read from a file and apply the X-Robots-Tag HTTP header, is this possible? Any pointers on how to ...
2
votes
1answer
38 views

How can I rewrite a URL to use a new path for Apache?

How can I rewrite a URL so that following is achieved: example.com/old/index.htm is redirected to example.com/new/index.htm ? I've tried to add the following RewriteRule in my server config vhost to ...
0
votes
0answers
83 views

Google is Indexing Some Pages With IP Instead Of My Domain [duplicate]

I have a Wordpress website and for some reason Google is indexing 50% of my pages with the servers IP address instead of the domain. For Example: https://3.333.33.333/products instead of mysite.com/...
1
vote
1answer
29 views

How to point a domain name to a subfolder

I have a working website: https://www.example.com It is a bit old, and now I want to make a new website. I don't want to make it on localhost but directly on the web. I was thinking to make the ...
0
votes
1answer
30 views

Restricting access to a website without using sessions or IP whitelisting? [duplicate]

I want to restrict access to a private website that needs to be accessible to multiple people. In the event the website has public and private areas, a login to a user session is the usual solution. ...
2
votes
1answer
31 views

htaccess - RewriteCond is met, but RewriteRule doesn't run

I am trying to match both a filename and querystring in my .htaccess file. When using an online testing tool (this one), it tells me that the conditions are being met, but the following rule doesn't ...
2
votes
1answer
58 views

Content that should be protected is served without authentication intermittently

Our website hosting is with a shared hosting provider. The only configuration we can make is through .htaccess files, we can't touch the apache configuration files that are sourced when apache first ...
0
votes
0answers
19 views

Rewrite local file links

I have *.html files accessible through file:// protocol in browser. Within these files are links to resources, like <img src="file:///c:/users[...]pic.jpg">. This all works fine for ...
2
votes
1answer
101 views

Block access to multiple files with .htaccess - RewriteRule and FilesMatch fail

I am trying to block access to specific files. Neither the RewriteRule or FilesMatch rules I have tried work on the live server, it serves the files as normal with status 200 OK (I'm expecting 404 ...
3
votes
2answers
59 views

Is it possible to display the path with an Apache index listing with a custom header?

I've set up a download site using Apache's index listing feature and a custom header: Options +Indexes HeaderName /index_header.html While the default header displays the path ("Index of ...&...
2
votes
1answer
70 views

Redirect requests on alternate port for Apache virtual host

I have Apache server where I make my LoadBalancer for my application sereres through proxy and balancermember. Some of my clients come from legacy access, they use a port in the URL example.com:2030 ...
2
votes
1answer
64 views

Can mod_security run in a “permissive” mode?

SELinux has a "permissive" mode where violations are logged but not enforced, thus allowing for debugging and troubleshooting before locking the system down. Is there such a feature in ...
0
votes
0answers
23 views

Pointing one subdomain to another subdomain of different domain for a website hosted in aws

I am trying to point a subdomain app.domain1.com to app.domain2.com, where I want to serve the content of domain2 without changing the URL domain1 in the browser address bar. I have added a cname ...
1
vote
1answer
60 views

PHP file not running using XAMPP [closed]

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
73 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
98 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
34 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
43 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
46 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
112 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
48 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
143 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
71 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
56 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
132 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
45 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
75 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
1k 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
28 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
66 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
208 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
105 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
272 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
393 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
33 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
20 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
51 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
57 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
210 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
115 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
59 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
29 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
631 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.

1
2 3 4 5
23