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
20 views

Problem with .htaccess redirection to my api

I have a wordpress site in wich i develop a plugin. Inside this plugin, I developed a api. In my local environment, my url to acess my site is http://localhost:81/site. I'd like requests made to http:/...
Marlon's user avatar
  • 1,817
0 votes
1 answer
30 views

How to redirect in htaccess without blocking php api?

I have an index.php file which is located in the root directory. This outputs either HTML or JSON, depending on the URL: <?php require_once('./../private/Router.php'); new Router(); ?> &...
RoyBlunk's user avatar
  • 113
0 votes
1 answer
12 views

RewriteRule /category?id=2 to /index.php?cat=2

I want /category?id=2 to redirect to /index?cat=2 in .htaccess I have tried with the following code RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^category?id=$ /...
Andreas Thomsson's user avatar
-2 votes
0 answers
10 views

Wordpress - rewrite all traffic from a subfolder in a subfolder to subfolder [closed]

my problem is that this scenario wont work with my tries. Example www.test.de/subfolder/ is a valid wordpress site and rewrites to index.php www.test.de/subfolder/subfolder/ is not a valid wordpress ...
Stefan Damann's user avatar
-3 votes
0 answers
23 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
23 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
25 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
1 vote
2 answers
34 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
17 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
13 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

15 30 50 per page
1
2 3 4 5
4873