Top "Mod-rewrite" questions

URL rewriting module for the Apache web server.

How to make .htaccess RewriteCond check domain name?

I have this rule: RewriteRule ^(about|installation|mypages|privacy|terms)(/)*$ /index.php?kind=portal&id=1&page=$1&%{QUERY_…

.htaccess mod-rewrite url-rewriting
PHP & Hash / Fragment Portion of URL

I am trying to find a way to save the hash portion of a url and as a PHP variable. …

php url mod-rewrite hash fragment-identifier
Redirecting Subdirectory to Subdomain with htaccess

I'm relatively new to using .htaccess, and have never done any coding besides what I've read online. I'm using Bluehost, …

.htaccess mod-rewrite bluehost
Understanding difference between redirect and rewrite .htaccess

I'd like to understand the difference between redirecting and rewriting a URL using .htaccess. So here's an example: Say I …

apache .htaccess mod-rewrite
Block by useragent or empty referer

A stranger bot (GbPlugin) is codifying the urls of the images and causing error 404. I tried to block the bot …

.htaccess mod-rewrite
Add mod_rewrite to Docker image httpd:alpine

I have almost no experience with Alpine Linux, to be honest, but I like its approach and therefore want to …

docker mod-rewrite apache2 alpine apache2-module
.htaccess in subdirectory 'overriding' parent htaccess

been searching for 2 days and can't quite get the right solution due to my lack of understanding of mod_rewrite …

php .htaccess mod-rewrite rewrite password-protection
Can't configure the rewrite log

I'd like to enable the rewrite log to debug some rewrite rules that are giving me problems. So I added …

apache mod-rewrite httpd.conf apache2.4 rewritelog
Apache mod_rewrite: force www only if not in localhost

I have the following in my htaccess to force the www in URLs: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{…

apache .htaccess mod-rewrite
Force non-www and https via htaccess

I'm trying to force a user to be redirected to the non-www website, and, force https. I've got this which …

.htaccess mod-rewrite https no-www