Questions tagged [.htaccess]
Directory-level configuration file found mostly on Apache web servers
2,831
questions
0
votes
0
answers
41
views
Nginx equivalent not working
Apache mod_rewrite (.htaccess):
Options All -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php [R=301,L]
...
0
votes
0
answers
14
views
need help - htaccess URL rewrite with query string
Disclaimer: I'm a semi-skilled novice, I've tried a few things but I'm missing something. My site is running a vBulletin Forum and nothing else. I recently upgraded my vBulletin version and moved the ...
0
votes
0
answers
19
views
Blocking bots with apache htaccess
I am trying to block bots (mostly "AI" bots).
I have this in my .htaccess file.
<IfModule mod_rewrite.c>
...
4
votes
1
answer
79
views
Case insensitivity for Cyrillic characters in Apache .htaccess RegEx does not work
Consider the following RewriteRules:
RewriteEngline On
RewriteRule ^services$ services.php
RewriteRule ^новости$ news.php
What they achieve is that www.example.com/services loads the content of ...
0
votes
0
answers
36
views
.htaccess - Apache rewrite rules, some work, some don't
this Rewrite rule is forwarding to url: https://www.fliesen-alfers.de/fliesennivelliersysteme/verlegefix-keilsystem/basis-sets/1-5-mm-basis-set/?number=102 as expected:
RewriteCond %{QUERY_STRING} (^|&...
0
votes
1
answer
51
views
if statement in htaccess
I'm using the following .htaccess to allow access to my website by IP address:
<Limit GET POST>
Require all denied
Require ip x.x.x.x
Require ip y.y.y.y
</Limit>
I was wondering if it ...
1
vote
1
answer
53
views
.htaccess to accept parameters in URL
I have a WordPress page with the following structure website.com.au/pre-registration/parameter-value/, where the parameter value was originally a GET parameter, but I was requested to make it part of ...
0
votes
0
answers
43
views
I am attempting to redirect a subdomain to an external site using htaccess. HTTPs is not working [duplicate]
My virtual Hosts are configured as follows:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
DirectoryIndex index.php
DocumentRoot /var/www/html/
ServerName ub-web-...
0
votes
0
answers
50
views
Using environment variables and a redirect loop to force-clear a 301 redirect
We mistakenly used a 301 redirect on a very important page, and now that we want to actually use the page, many users' browsers have the 301 stuck in their cache. The problem is that the destination ...
3
votes
1
answer
452
views
How to match beginning of file name using htaccess
I am attempting to modifying my .htaccess file within a specific directory. If a web user attempts to find any file in this directory that may be named like the following options, I want them to be ...
0
votes
0
answers
47
views
Getting to testing site when typing dev.example.de (subdomain for testing basically)
I want to get directed to my testing site when I type dev.example.de. The directory already exists, but everytime I type dev. I get directed to the production page (without dev). I've been trying to ...
0
votes
1
answer
34
views
Excluding all files that begin with X in .htaccess maintenance mode redirect
Here's my maintenance mode redirect:
# MAINTENANCE-PAGE REDIRECT
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^0\.0\.0\.0
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|...
0
votes
1
answer
81
views
.htaccess to get the list of ip from a file or directories of file
I'm blocking certain spammers/bots from accessing my website via IP addresses, but I have around 3 directories (/var/www/directory1, /var/www/directory2, /var/www/directory3).
Every time I want to ...
0
votes
0
answers
166
views
HTTPS redirect not working
My old domain is paradise-greece.com and I am forwarding to my new website paradisemykonos.com via Godaddy dashboard (301). Problem is, Google crawled https://www.paradise-greece.com/ which doesn't ...
0
votes
0
answers
46
views
Confirm these 301 redirects are correctly setup in my htaccess file
i have in my root directory my english page and in subdirectory folder arabic page but the rule but as per https://htaccess.madewithlove.com/ :
RewriteCond %{HTTP_HOST} ^arianamedicaretour\.com$ [NC]
...