Skip to main content

Questions tagged [.htaccess]

Directory-level configuration file used by Apache web servers. Use this tag if and only if .htaccess content is directly involved in the topic. We know many people are using .htaccess, but kindly ask the members of the community to not use this tag, unless you know it is on-topic in your question. Also notice what the [tag:apache] tag has to say about questions about _configuring_ Apache httpd and their potential off-topicness on Stack Overflow

-2 votes
0 answers
16 views

Bloqueio de PDFs no site Wordpress via Htaccess [closed]

Tenho o seguinte código: # Verificar se o arquivo solicitado é um PDF RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_URI} \.pdf$ [NC] RewriteCond %{HTTP_COOKIE} !user_logged [NC] # ...
Michel Sena's user avatar
0 votes
0 answers
20 views

Htaccess for protecting gravity forms uploads

I have the following code to make sure that the gravity forms directory in the uploads folder and it's contents cannot be accessed by non-logged in users. <IfModule mod_rewrite.c> RewriteEngine ...
Ashtheslayer's user avatar
1 vote
0 answers
19 views

How To Allow Popup Ads Only On Certain Website Pages Using .htaccess File

As a webmaster I would like to exclude popup ads on certain specific webpages on my website whos url ends with a particular string. Example : https://mywebsite/some-slug-variable/?gallery=submit I am ...
Nicodemo's user avatar
0 votes
2 answers
32 views

.htaccess map to /books or /books/ or /books/<url_slug>

I am trying to map.htaccess to /books or /books/ or /books/<url_slug>: Options All -Indexes RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ $1 [R=301,...
Alix Blaine's user avatar
0 votes
1 answer
15 views

Redirecting in .htaccess with RewriteCond

I'm trying to redirect this kind of URL: kod-rabatowy/groupon/1234 kod-rabatowy/groupon/12345 To: kod-rabatowy/groupon/ "groupon" is a variable that I want to have in new url. So only when ...
Miłosz's user avatar
0 votes
0 answers
14 views

How to allow some customers to bypass the website .htaccess

My website www.attractionsofchina.com a strict .htaccess file, that blocks countries like Russia or vietnam. Some of my clients, may - on occasion - travel to such countries. What is the easiest/...
Kevin's user avatar
  • 11
0 votes
0 answers
16 views

.htaccess 301 redirect with # hashtag in the URL

i need to redirect a single url with a # within it. For some reason the system generated this. Old URL: https://testurl.com/part1#/part0229452 New URL: https://testurl.com/part1 I think that the '...
Johan van der Meer's user avatar
0 votes
0 answers
12 views

Is there a way to redirect www.domain.com links to domain.com?

My website keeps getting referrals, but the referrals are mislabeled as "www.domain.com". My site is a non-www site, so anytime someone tries to directly search our website or click the ...
Spencer Engelby's user avatar
0 votes
0 answers
14 views

WordPress multisite redirect from Mainpage to Sub Page

I have a WordPress multisite setup. Now I want a redirect from the Main Page www.mypage.com to www.mypage.com/CH-DE. it should work with mypage.com, www.mypage.com, https://wwwmypage.com.
Penumbra's user avatar
  • 193
0 votes
0 answers
29 views

.htaccess for news title

I'd like to open a news link as a direct link, such as: index.php/my-news-title-here but "officially" the page that will be opened will be like leggi.php?permalink=my-news-title-...
Marco Scarpa's user avatar
-1 votes
0 answers
21 views

WP, How to remove slug from homepage [closed]

I've had a reason to turn my static Homepage from Page type to Post type, using 'post type switcher' plugin. That part was easy. Problem is now my site base url is showing slug of the post instead of ...
Matt Perry's user avatar
0 votes
0 answers
26 views

I can still see contents of directories on apache linux [closed]

The content of my .htaccess file are as follows: Options All -Indexes AllowOverride None I have Amazon Linux 2023 image and this is not working. I can still see the content of the directories. Can ...
coderatlarge's user avatar
1 vote
1 answer
42 views

Apache 308 redirects change the protocal from https to http

So I recently updated my .htaccess to replicate the directory slash directive with a 308 instead of the 301 Apache normally uses, so that the browser repeats the same request instead of changing it to ...
Brad's user avatar
  • 880
0 votes
1 answer
17 views

wordpress "Content is blocked", and all pages redirecting to a single page, including wp-admin and wp-login

Client's site completely broken today. Possibly when I added a txt file to the DNS area, in an attempt to link it to Google workspace. I have since deleted the txt file, but the site is still broken. ...
Paul Murphy's user avatar
1 vote
0 answers
26 views

500 Internal Server Error --> public_html/.htaccess: </Files> without matching <Files> section

Error log reveals this: [Thu Jul 11 09:02:07.943146 2024] [core:alert] [pid 2141270:tid 22895643105024] [client 183.146.13.38:46683] /home/wwwstcchicago/public_html/.htaccess: </Files> without ...
Webmaster STC Chicago's user avatar

15 30 50 per page
1
2 3 4 5
4874