Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
12 views

WP Migrate DB Pro plugin cannot transfer Media files to remote server

I'm using Delicious Brain's WP Migrate DB Pro plugin to migrate database tables and to transfer Media files (add-on) from my local virtual machine to my remote server (provided by GoDaddy) This ...
0
votes
0answers
21 views

Loading /wp-content/uploads/site as /site/

I love websites so much that I want to put a website into another website. I have a static site under /wp-content/uploads/site. It has a lot of pages and I can access it without an issue in https://[...
1
vote
1answer
42 views

Append country to 'pretty' url but serve same page

For one particular page on my site I would like to append the country to the URL. The reasons for this are purely aesthetic so the customer knows that the prices on that page are in their own currency ...
1
vote
1answer
27 views

How do I redirect all 404 error url to Subcategory url

I have a b blog of over 200k+ post and I moved all post from a specific category to a subcategory, I have also deleted the post from the my main site, so all the post of that category have been moved ...
1
vote
2answers
34 views

How to redirect from various ?page_id= to home page?

I have a website where I need to 301 redirect all old pages that are incoming from old URLs like /?page_id=261, /?page_id=204, /?page_id=2677 and so on to the main home page. What would be a proper ...
1
vote
1answer
33 views

Redirections and rewrites to subdomain

I am currently working on a new WordPress website, to partially replace a non-WP website that includes a webshop. Now, the plan is to migrate the webshop and all matching pages (shopping card, order ...
0
votes
1answer
46 views

Install second wordpress in root subfolder, Error 404

I am trying to install wordpress in a subfolder of an existing wordpress installation. I created a the subfolder /wp unziped a fresh Wordpress download inside of that directory and added a .htaccess ...
0
votes
1answer
22 views

How to allow download url redirection only if user logged in Wordpress site?

I'm trying to allow url-redirection (from /dl urls) only if user is logged-in to wordpress site. Otherwise don't allow. However it went "page not found" when i click these urls with or without logging ...
1
vote
2answers
44 views

How to change redirection route to a php page for making it only accessible by logged-in members?

Background of my problem: I'd like to mask external download links as internal links and to be only accessible by logged-in wp users at htaccess level or with PHP script but when redirection happens ...
1
vote
2answers
18 views

WordPress - Promoting A Dev Build In A Subdirectory To Production / Root Directory

I recently took over a WordPress site with the following directory structure inside of /public_html: wp_config.php /wp-admin /wp-content /wp-includes ... ... ... /development The root (production) ...
1
vote
1answer
38 views

htaccess, site and staging in subdirectories

I have the following task and as it is a little different from most setups, I couldn't find any hints that solved my problem. WordPress for the live site was installed into a subfolder /wp1, the ....
2
votes
1answer
23 views

Why specific file directory fails to redirect but its parent folder succeeds?

I activated multisite using subdirectories on my old WordPress site, and I created a new site (say my-example.com/new-site/). I found links such as my-example.com/new-site/wp-content/mu-plugins/css/ ...
0
votes
1answer
20 views

Iterating users while user iteration is suppressed

Recently I noticed various login attempts being blocked by security plug-in this is pretty much ordinary when the attempt is about non-existent users or default/common user names like the website name,...
1
vote
0answers
12 views

Wrong filepaths and admin page infinite reload after migrating to aws bitnami

I recently migrated my wordpress multisite from localhost to aws bitnami multisite. I used duplicator pro, deleted everything inside the wordpress/htdocs folder and ran the installer.php hrom there. ...
1
vote
0answers
59 views

Page preview is shown, updating page gives 404 error

I can add new pages and preview them, but once I upload them I get a 404 "Not found" error. I thought it's a problem with my permalinks, so I followed some tutorials to fix this like http://www....
0
votes
2answers
56 views

Redirect from https to http or from http to https? [closed]

We have a WordPress blog, google is indexing http as well as https urls. Now we are considering to either redirect https to http, or to use https and redirect all http traffic there. And how can we ...
0
votes
1answer
48 views

removed index.php now all pages 404

I added this code to my .htaccess file to get rid of index.php, but now all the pages 404 (the hyperlinks are mapped to the correct url) # BEGIN WordPress <IfModule mod_rewrite.c> ...
0
votes
0answers
18 views

Mystery with permalink: works only with Custom Post Types and not with Posts and Pages

My permalink works only with Custom Post Types and not with Posts and Pages. The permalink structure is https://mainsite.com/mysite/%category%/%postname%/ I'll break down the details of the mystery: ....
0
votes
0answers
31 views

Wordpress site not forcing from http to https instead getting redirected too many times

This is what I have done so far. In the settings in the admin I have updated the url to https e.g https://www.example.com But if i was to visit a page for example https://www.example.com/contact-us ...
0
votes
0answers
50 views

Can I add a rewrite rule in htaccess to remove the multisite subdirectory from the URL?

I am working on a Multisite that was installed and activated on an old version of WordPress. The WP files were placed in a subdirectory named /wp/ and now a request has been made for the subdirectory ...
0
votes
0answers
34 views

Wordpress Media Library rendering blank image tiles

Problem: I have been experiencing an error with all my images on my site. When I navigate to my website in any browser, none of the images are rendering. When I login to my admin portal and navigate ...
0
votes
0answers
21 views

WordPress Multisite query parameters

Am currently having an issue with the redirection of query parameters on a multisite. I have embedded an Angular App inside an iframe and have a script to assign the query parameters of the app to the ...
-1
votes
1answer
20 views

Multisite website configure Domain issue

I have multi site website lets say example.com example.com/ab and example.com/cd. Now I need to add another website in this network which is run on separate domain. lets say mywebsite.com and ...
1
vote
1answer
34 views

Headless Wordpress redirect front-page to login page [closed]

Is there any way to redirect https://example.com/ to https://example.com/admin with .htaccess ? I'm using WordPress only for the API.
1
vote
3answers
44 views

Permalinks settings page blank

My site is giving a 500 error and I've been trying various ways to fix it. First, I'm trying to reset permalinks, but the options-permalink.php page is totally BLANK. Unlike all the other solutions ...
2
votes
1answer
71 views

Is it possible to dynamically redirect URL using htaccess?

Is there any way to dynamically redirect URLs. For example, I want to redirect any URL from https://example.com/NNNNN to https://examplecom/?p=NNNNN. Where NNNNN could be any possible numbers. For ...
1
vote
1answer
75 views

Landing Page Redirect Chain | http->https->https www

I am getting this error for redirect chain on GTMetrix when I check my website. The chain is as follows: http:// https:// https://www. I am using this plugin for HTTPS https://wordpress.org/...
1
vote
1answer
75 views

Write to / remove from default .htaccess file from plugin?

I'm working on a WordPress plugin, and I have a checkbox option to add cache control headers. I'd like to write to the htaccess file if the option is set to 1, else remove the new content. I've been ...
0
votes
1answer
45 views

Wordpress redirect all 404 pages to the Homepage

I want to redirect all 404 error pages on my WordPress site to the homepage, or to a specific page. Any advice?
1
vote
1answer
29 views

How to restrict access to image folder depending on whether product is purchased or not?

In WordPress I want to be able to sell sets of emoticons (png images). These sets emoticons are stored in a folder under the plugin (eg. wp-content/plugins/my-plugin/emoticons/set-1/happy.png) Some ...
0
votes
1answer
27 views

How to make front page temporarily show content of internal page

I'm building a Wordpress site with /blog/ as the posts page, with ACF and other options on the page. Client wants to launch the blog part of the site on their current non-wordpress site as a ...
1
vote
1answer
43 views

Specific URL has 403 Forbidden status code

I'm debugging a Belgian WP website: slotenmakerbelgie.com. The problem is that I get a forbidden status on a specific URL: slotenmakerbelgie.com/error/ (with and without trailing slash at the end) I ...
0
votes
1answer
42 views

Pretty Url not working on the server

I have a wordpress website however I am not able to make the pretty permalinks work on it. The htaccess fil is writable on the server with file permissions 777. So kidly guide me on the issues and ...
0
votes
0answers
64 views

htaccess redirects invalid request to home page not 404

Trying to work out how to get Wordpress / .htaccess to show a 404 error page for invalid requests. With a default WP .htaccess file a request like https://example.com/?exam=testing.html will ...
1
vote
0answers
29 views

Built-In Postname Redirection vs Hard Redirects in relation to SEO and performance

It seems that many Wordpress users, even very experienced ones, aren't aware that, in normal circumstances, with pretty permalinks enabled, an inexactly written or superficially non-matching URL will ...
1
vote
1answer
23 views

How can I code my plugin to safely modify .htaccess?

I want to add rules to .htaccess from within a plugin without upsetting the WP core permalink rules or rules that other plugins have added. (My aim is to block scraping of fonts by checking the ...
0
votes
0answers
17 views

Access non-wp .php file on Wordpress subfolder

I have the following .htaccess for my wordpress / bedrock installation: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /mysite/ RewriteRule ^index\.php$ - [L] ...
1
vote
0answers
36 views

URL redirect/rewrite rule wordpress multisite

I am running wordpress multisite on a server. The main site is working just fine are url redirects are perfect. Say my domain is www.adeel.com and the site is run on following url www.adeel.com/area-...
1
vote
1answer
106 views

Redirect Specific Wildcard Subdomain to a specific URL on another domain

I want to redirect specific wildcard subdomain to a specific URL on another domain. Both domains are on the same server/public_html, and redirect all the inner pages of the wildcard subdomain to the ...
0
votes
0answers
11 views

Subdomain install 404 on /wp-admin/network only

I've setup a subdomain install on a Runcloud instance. Each domain on the network works just fine. Accessing pages, posts and the dashboard for the 2 sites works. I have also installed a wildcart ...
1
vote
1answer
93 views

Fix 403 error on WordPress multisite network using subdomains

I've a WordPress installation that I've transformed into a multisite network. I'm using cPanel and I've followed all the instructions to configure the WordPress installation. I've set up the ...
0
votes
0answers
19 views

How to stop WordPress template_redirect from interfering with custom redirects?

WordPress has a 'template_redirect' feature that will 301 redirect visitors who request a page that does not exist, if it can find a page that closely matches the one originally requested. For ...
0
votes
1answer
47 views

fix 302 redirection error on https

I have a problem with my wordpress fresh installation. I'm using the .htaccess to redirect all my traffic on https, but every time I see a 302 error page. How I can fix this? here is the .htaccess ...
0
votes
0answers
23 views

I cant remove TAG from URL even in HTACCESS

i tried putting dot in permalinks (which is like 2012 fix) but it didnt work so i added that code to htaccess RewriteRule ^category(.+)$ http://example.com/$1 [R=301,L] RewriteRule ^tag(.+)$ http://...
0
votes
0answers
33 views

Multiple permalink with and without category for same post

It is a directory site with geodirectory plugin. Site owner wants 2 URLs for every post. One with category and another without category. For example: http://example.com/place/category-name/the-post-...
0
votes
0answers
21 views

trying to install a wordpress multisite in a subfolder and have custom subsite urls

I'm working on a project for a client where they currently have a WordPress blog installed on its own server and the url is www.example.com/blog. Now they want to convert the WordPress install to a ...
0
votes
1answer
31 views

Custom Params in URL

Here is the URL I currently Have working : www.Mysite.com?b=ex%2021 I thought I could just add some rules in the .htaccess file, so i added this : RewriteEngine On RewriteRule /b/(.*)/$ index.php?b=...
0
votes
0answers
10 views

htaccess questions wordpress multisite in combination with other cms

I installed a wordpress multisite on a server that already contained different subdomains and another cms installation (wolfCMS). It currently works fine by going to the root.nl/wordpress/$year/ ...
0
votes
1answer
49 views

Allow direct access to files/folders within Wordpress to replace wp-admin

Here is the scenario: I would like to design a brand new wordpress admin for my clients (using WordPress autoload as the core to interact with WordPress). I have tried slightly modifying the css or ...
1
vote
1answer
36 views

WP install in sub-dir white screen

My WP moved from localhost to online, and now it shows a blank page (wp-admin is working normally). This is the structure: sub.domain.nl/dir1/dir2/WP-install Something must me off with the ...