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
1answer
35 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
16 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
28 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
40 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 ...
-1
votes
0answers
21 views

Seo Friendly URLs without 301 Redirect?

I am trying to create SEO Friendly URLS for my search page. Modify This https://www.example.com/search/?search_text=keyword&category=1 To this: https://www.example.com/search/keyword/?...
0
votes
0answers
29 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
17 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
0answers
17 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
29 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.
0
votes
3answers
36 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
66 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
39 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
37 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
41 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
28 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
26 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
41 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 ...
1
vote
1answer
34 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
28 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
19 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
16 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
32 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
36 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
8 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
41 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
16 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
28 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
20 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
30 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
29 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
9 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
27 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
35 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 ...
0
votes
0answers
96 views

React Router with Wordpress

I am using React Router (React app in a home page) with WordPress. The problem is when a user first loads a page with client URL route, for example site . com/recommendations, they see a 404 error. I ...
1
vote
1answer
26 views

.htaccess too many redirects based on category slug

I moved my wordpress page up a directory and also changed a bunch of categories with new names. But when I try to set a 301 redirect via .htaccess and then access that category url, the browser errors ...
0
votes
0answers
23 views

Redirect after login when WordPress in subdirectory

I've a problem in my Wordpress website which is after I login from /wp-admin I didn't redirected to anywhere just keep seeing the login page without any errors. it was working fine when the site was ...
0
votes
1answer
47 views

Rewrite Page Parameters

i have a page call "city" http://localhost/wordpress/city/ and it get details from mysql by url id like http://localhost/wordpress/city/?id=paris and i want to change it like http://localhost/...
2
votes
3answers
126 views

Cannot mask WordPress page URL using .htaccess

.htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp_test/ RewriteRule ^index\.php$ - [L] RewriteRule ^the_image$ wp-content/uploads/2019/01/banner\.jpg [L] RewriteRule ^...
0
votes
0answers
22 views

Site can't be reached after using Smush

I was trying to fix the images on my website and came across a plugin called Smush. it had really good reviews as well. So I decided to try it out and after using this plugin my site stop responding. ...
1
vote
2answers
44 views

How to change old permalink?

My old permalink structure is /index.php/%year%/%monthnum%/%day%/%postname%/. For example: https://example.com/index.php/2019/01/08/technological-innovation-for-agriculture-sector-in-india/ but I ...
1
vote
1answer
22 views

How To Fix 404 errors caused by Google Indexing Wordpress In Subdirectory

I moved WordPress out of the root of my server into a special folder of its own and now Google is indexing my posts together with that special WordPress folder thus creating some 404 error issues. ...
1
vote
2answers
45 views

Cleanup URL for a custom page in wordpress

I have a wordpress website in which I have a specific page for dictionary. This page is actually a custom page and does these things: site.com/dictionary lists all the words site.com/dictionary/?w=...
2
votes
2answers
34 views

HTAccess stops me from accessing WordPress Dashboard links

I have a WP site which I have not looked at for a while. I have just logged in to update aspects of it, including WP itself, now on 5.0.2. Now if I click on any of the Dashboard links - Posts, ...
1
vote
1answer
44 views

How can I fix the redirect chain after implementing ssl on wordpress?

After implementing ssl on wordpress, I wanted to force a redirection to a site with the following characteristics: non www, ssl, with trailing slash Unfortunately it only works in some cases. For ...
0
votes
0answers
13 views

WordPress multisite, redirection to subdomain

I have a WordPress site that works in multisite. The main URL just serves as a cover page to redirect visitors to their store relative to a Google map. Once on their store mag1.mysite.com for example, ...
1
vote
1answer
20 views

redirect automatic page that serves custom posttype content

I registered blog as a custom post type. This content is queried on the page page-actueel-blog. But mydomain.com/blog also serves content (by default titles are queried). I don't want visitors to ...
0
votes
0answers
14 views

htaccess redirect multisite

I have a multisite wordpress like monsite.fr and subdomain sub1.monsite.fr sub2.mysite.fr ... I have a booking module "salonbooking" At the click of a button from the booking part of sub1.mysite.com I ...
0
votes
1answer
73 views

I can't access login page

I was copying my web from live host, but when I want to access admin dashboard, the url can't be accessed The url is changed to be like this : http://backstagewhisp.local/wp-admin/backstagewhisp....