Skip to main content

Questions tagged [htaccess]

The most common name of the per-directory settings file for the Apache server. WordPress stores the mod_rewrite configuration for "Pretty Permalinks" here. [url-rewriting] should be used for the WordPress rewrite system in general, [mod-rewrite] when you talk specifically about the Apache module.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

The wp-admin url for each site does not work on WordPress multisite

I'm having some trouble while trying to access the admin area of each site in a WordPress multisite. I have the following settings in wp-config.php define('WP_SITEURL','https://web.mydomain.com'); $...
Enrique's user avatar
  • 53
0 votes
0 answers
18 views

Accidentally Changed Permalink Structure

I accidentally changed my permalink structure form "postname" to "plain" but when i realized all my articles that were ranking are disappeared so i changed it but nothing changed ...
Jazib's user avatar
  • 1
0 votes
0 answers
17 views

Forward and mask implementation not working,

I'm trying to implement forward and masking of a url. I have a page hosted on vercel.com as mynewpage.vercel.app. The rest of my page are hosted on Wordpress on myotherpages.com. I want for when the ...
Latifah President's user avatar
1 vote
1 answer
45 views

Avoid duplicate content on pretty URLs with htaccess

I'm trying to avoid duplicate content on my blog caused by trailing slashes. Currently, these URLs display the same content: https://espartedelviaje.com/que-hacer-en-sydney https://espartedelviaje....
DiegoB's user avatar
  • 13
0 votes
1 answer
38 views

Running non-Wordpress PHP files

It seems that Wordpress has changed the default .htaccess file so that you can no longer run different PHP code within the a subfolder. It also states that the block in the .htaccess file is ...
Exit's user avatar
  • 319
0 votes
0 answers
25 views

Custom URL structure

I have several subpages and over 100 posts in WordPress. Their structure is standard and looks like this: example.com/contact example.com/about example.com/post1 example.com/post2 Now I need to add a ...
k85m's user avatar
  • 1
0 votes
0 answers
25 views

How to beautify filter path url?

currently using a filter to create seo friendly pages. URL looks like this: website.com/shop/filter/product_cat-xxxx-and-xxx-and-xxx I wish to show it to customer as website.com/shop/puzzles/adventure ...
Spy's user avatar
  • 1
2 votes
2 answers
172 views

How to I serve the static HTML file at the root directory in a wordpress site?

I am trying to use wordpress as a headless CMS for my react frontend. The build version is completely functional connecting to the wordpress api https://www.example.com/wp-json/wp/v2. The react ...
Rifky Niyas's user avatar
0 votes
0 answers
57 views

NGINX rewrite rules for Wordpress Subdirectory Multisite to support deep URL

I'm trying to setup a Wordpress Subdirectory multisite that can support deep urls. By deep urls, I mean the the sites should be able to have more nested parts. E.g https://example.com/path/nested/...
Itse Sagay's user avatar
1 vote
0 answers
418 views

htaccess file prevents js scripts to run

In my WordPress website whenever the htaccess file is added to my public_html folder, I have so many errors in my js files. for example: Uncaught TypeError: gform.initializeOnLoaded is not a function ...
Arash Naderi's user avatar
0 votes
1 answer
223 views

FilesMatch in htaccess

Suddenly my WordPress site is not working - looking at .htaccess it has <FilesMatch ".(py|exe|php)$"> Order allow,deny Deny from all </FilesMatch> <FilesMatch "^(about....
anjanesh's user avatar
  • 121
1 vote
1 answer
25 views

wp-content/uploads/year/month returns 404

I have a litespeed hosting I have disabled all plugins and all wordpress related htaccess rewrites. If I go to https://digitalzoomstudio.net/wp-content/uploads/2023/ - then I can see the directory ...
digitalzoomstudio's user avatar
0 votes
0 answers
32 views

images inside uploads folder will return 404

My images will not load . accessing anything inside the uploads folder returns 404 https://digitalzoomstudio.net/wp-content/uploads/2022/11/image-1-1024x617.png I am 99% sure I am not crazy and that ...
user237193's user avatar
1 vote
1 answer
17 views

How do we ReWrite HTACCESS to point a cat/subcat Product URL, to Cat/ only?

We have a problem where a site has got some odd URLs indexed by Google. This is the incorrect path: example.com/shop/mens/jeans/jean-product/ This is the correct path: example.com/shop/mens/jean-...
Simon_a6's user avatar
0 votes
0 answers
43 views

Allow file access only via cookie

I need to have groups of PDF files on a site that are protected by different passwords, which I have solved with WPYog Documents plugin to create individual document repositories and Passster plugin ...
Pavel's user avatar
  • 1
1 vote
1 answer
38 views

Wildcard multisite wp-admin url wrongfully redirected

So, this is the situation. I have a working top level domain site (https://example.com) and I set up a wild card subdomain (*.example.com) and multisite settings in WordPress. It works as expected, as ...
Sven V's user avatar
  • 11
0 votes
0 answers
46 views

Change WordPress Multisite Domain to subfolder

I want to change my existing WordPress Multisite main site to be in a folder. For example, this is my current main site of the network: example.com. Other domains in the network have folders like ...
Cray's user avatar
  • 145
0 votes
2 answers
128 views

Security headers disappear on Wordpress pages

I am facing a problem that both me and my host support team were unable to untangle. I have included security headers in my .htaccess file (see below), but I get inconsistent results: All the headers ...
AnalysisStudent0414's user avatar
0 votes
0 answers
16 views

how to redirect static folder to wordpress page?

I have wordpress installed, but under the root directory of my website I also have several folders used to store documents not uploaded through wordpress (e.g. pdf files of articles written by certain ...
Jon Fergus's user avatar
0 votes
1 answer
106 views

Redirect all pages to a specific page of a new domain but exclude specific pages

I'm trying to redirect all pages of example.com to a specific page domain.com/rebrand-explained except for the following pages, they need to be going to the same slug on the new domain for example: ...
Johan Barnard's user avatar
0 votes
0 answers
27 views

Intercept numerical subdomain requests

Is it possible, via .htaccess to intercept all numerical subdomains ex. (02321.example.com), and forward them to example.com/02321 ..and HOW do i write it (i'm not god at regex) and how to get NOT ...
Adam Larsson's user avatar
0 votes
0 answers
26 views

Bulk 301 redirect for Taxonomies with pagination

I'm looking for the best way to bulk redirect for modified taxonomy URLs. After category slug has been changed, I need to perform a redirect for all paginated pages: /category-old/ redirects to /...
Alexius The Coder's user avatar
2 votes
2 answers
124 views

Does WordPress automatically redirect to the URL specified in settings?

My WordPress site used to require htaccess rewrite rules to redirect non-www to www (or vice versa) and http to https. Without those rules, the site would be accessible at whatever URL the user ...
Dave's user avatar
  • 119
0 votes
0 answers
25 views

URL rewriting problem

He guys, I would like to rewrite URLs like the following one: https://my.domain/blog/2023/09/18/newsname to the following https://my.domain/newsname So, category (and maybe even subcategory) and date ...
mnahrgang's user avatar
0 votes
0 answers
65 views

All Pages and Post are redirecting to 404 Not Found in wordpress

I am using wordpress, I have created 3 pages and 4 posts on my website. I am able to access the front page but the rest of the pages are showing 404 not found, Same for post also. If I use some logic ...
Naren Verma's user avatar
0 votes
1 answer
147 views

Wordpress website hacked - index.php file modified

My website has been hacked, that is when I click any page its redirect to home page. Unbale to open wp-admin as well. I checked the server, it seems root folder index.php file has been modified with ...
Anish's user avatar
  • 1
0 votes
1 answer
301 views

wp-login - unable to redirect user to a custom login url

I have this code in a template file that will contain my vue app that I want to load in WordPress. <?php /* * Template name: App */ ob_start(); get_header(); if( is_user_logged_in() ) { ?> ...
OHICT's user avatar
  • 133
1 vote
1 answer
117 views

Why is this line of code Wrong in every Wordpress .Htaccess security article?

The following line of code (RegEx) is partly wrong in every Wordpress .Htaccess hardening article I've seen. Why is that? <FilesMatch "^.*(error_log|wp-config\.php|php.ini|\.[hH][tT][aApP].*)$&...
Yahya Tarjuman's user avatar
1 vote
0 answers
52 views

Return 403 for specific paths in Wordpress

my site has been compromised and now crawlers try to index thousands of pages that no longer exist. I would like to return a 403 for these attempts because the query limit of the hosting has been ...
vendrillo's user avatar
0 votes
0 answers
127 views

How to do SEO friendly filters urls?

I have a WordPress website. It uses Woocommerce. All products are loaded and attributes are created. When the user opens the catalog page and selects the filter values, there are problems with the URL....
Artm's user avatar
  • 1
0 votes
1 answer
183 views

Hardening WordPress - how to set .htaccess permissions?

I have been reading about File Permissions in Hardening WordPress on wordpress.org When it comes to .htaccess, the guide currently says The root WordPress directory: all files should be writable only ...
Dave White's user avatar
-1 votes
1 answer
44 views

cant access website thru www only works on direct xyz.com

i have recently migrated my website to kinsta. the site is not loading when you enter https://www.example.com with the domain, but loads well on https://example.com please give some pointers to ...
Muhammed Muneer's user avatar
0 votes
1 answer
200 views

How can I make /wp-admin the root url?

So. I want my users to type: https://example.com and immediately come into the WordPress admin panel. Ideally without seeing wp-admin in their browser. The only users of this site are admins, creating ...
Kropotkin's user avatar
  • 179
0 votes
1 answer
154 views

Allow requests to resources outside the wordpress folder

I have wordpress website https://example.com. /wordpress is never part of the url. It runs on a dedicated server that runs Plesk Onyx. The file structure is | - httpdocs | - wordpress | - ....
Sam Dean's user avatar
  • 101
0 votes
1 answer
23 views

Redirect loops in Bing holding my sites back

Have been running HTTPS for a while and everything is good. I was looking at the webmaster tools on Bing and it shows some redirect loops going on. I see thousands of them. I've looked at all the ...
The King Repairs's user avatar
0 votes
1 answer
822 views

How do I modify each instance of setcookie?

I have an internal WordPress site that I'm trying to embed via iFrame. Currently, I'm stuck on: Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. ...
Kermit's user avatar
  • 155
0 votes
0 answers
69 views

WP-Include rewrite directory

I try few day to rewrite wp-include directory but not success. In .htaccess I add next line <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^main/(.+) /wp-includes/$1 [L,...
kuribo's user avatar
  • 1
1 vote
0 answers
330 views

Subfolder install not working

I have my main site inside the root public_html folder, and that is working fine. Alongside that I have 2 subfolder installations, out of which only one is working. I made no changes to my .htaccess ...
dingo_d's user avatar
  • 1,960
1 vote
1 answer
83 views

Redirect old homepage to the new one within the same site

I am wondering how can I redirect the old homepage https://blog.example.com/ to the new one https://www.example.com/ratgeber/ I have tried to redirect it via a WordPress Plugin, but when I insert the ...
Roman Trushanov's user avatar
1 vote
1 answer
1k views

How To Add CSP frame ancestors in Wordpress Website? [closed]

I'm trying to add Content Security Policy (CSP) frame ancestors in .htaccess file to prevent our website from getting iframed on other websites. Following is the code: <IfModule mod_headers.c> ...
Vaibhav Singh's user avatar
0 votes
0 answers
54 views

Rewrite Rule in htaccess convert query string into slashes

Please examine and correct this code: I want the code to work such that if somebody visits https://example.com/music/?record_year=2022, it should be https://example.com/music/record_year/2022 instead. ...
John Ovye Godwin's user avatar
1 vote
1 answer
59 views

Standard Htaccess directives disappear by themselves

I have an odd issue on one of my websites. I'm talking about the standard, native, url directives put by wordpress, that just plain disappear from time to time, which of course breaks my site. Here is ...
Bucheron's user avatar
5 votes
3 answers
520 views

How to use 'blogs.dir' as media upload instead of 'uploads' directory in WordPress multisite setup

Setup 1 : The general subdomain/custom-domain based multisite setup for child network sites has its upload directory like this /home/example1.com/public_html/wp-content/uploads/sites/8/2022/01/logo....
AnupRaj's user avatar
  • 206
1 vote
1 answer
631 views

.htaccess seems to be required but I can not find it

I installed WordPress on Ubuntu 22.04 and when I tried to write a post or edit the default post that comes pre-installed I got an error message: The response is not a valid JSON response After a lot ...
user3425506's user avatar
1 vote
0 answers
26 views

WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?

You know WordPress is adding pagination for all pages not only for posts page/blog page. For example www.mysite.com, I'm getting URLs like www.mysite.com/page/15, etc. Here, www.mysite.com has a ...
Murali Krishna P's user avatar
1 vote
1 answer
125 views

Add rewrite endpoint and .htaccess

I'm trying to make a redirection with .htaccess and rewrite endpoint (add_rewrite_endpoint()) and it's working but at the time of redirection it adds a /1/ to the route and I don't understand where it ...
Javi Ps's user avatar
  • 113
0 votes
0 answers
266 views

404 error in dashboard of subdomain of multisite

I am getting a 404 error whenever I click to ender the dashboard of my subdomain and on the front end, I am getting an "Index Of /" for the same subdomain. I've followed the instructions in ...
Shimel Kemoa's user avatar
3 votes
2 answers
712 views

How to use multiple 404 Error Pages in Wordpress

I have a question and couldn't find a solution for it. We have a Wordpress page where the client wants multiple error pages. 1 error page is in the usual normal 404.php for the custom theme which we ...
Jaba's user avatar
  • 63
0 votes
1 answer
152 views

Other pages fine but wp-admin showing ERR_TOO_MANY_REDIRECTS Error

wp-admin showing ERR_TOO_MANY_REDIRECTS Error and can't let me login into dashboard but Other pages loading fine. FIXED
rawaha johns's user avatar
1 vote
1 answer
78 views

External rewrite rules missing in htaccess - Multisite

I'm trying to set up some external redirects, but it seems like they are not being added to htacccess even tho it's supposed to (I think). add_rewrite_rule('^dashboard\/([^.]+\.(jpe?g|gif|bmp|png))$', ...
Zeldri's user avatar
  • 11

1
2 3 4 5
27