Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

-1
votes
0answers
15 views

Why Do I Have Two Permalinks For This Post

I'm a bit confused by something happening on my site, in the admin-backend section of WordPress, I have two categories selected, a parent and child. I have the Yoast SEO plugin, and the child is set ...
2
votes
1answer
46 views

Rewrite WordPress Custom URL

I have a custom WordPress url which is generated by ID. I have to rewrite this url https://example.com/account/customer-bookings/?view-booking=4 to https://example.com/account/customer-bookings/view-...
0
votes
2answers
30 views

change URIs of migrated site

Hi Ive uploaded a WP site onto a new server updated the DB and can get into the backend and even see the homepge. However, all the links are messed up. I wasnt able to change the URL in the settings ...
0
votes
1answer
13 views

Fresh install redirects to www, breaking page loads

I set up a new Wordpress site, wanderandponder.com, on DigitalOcean yesterday. It was on a droplet that also ran several other Wordpress sites, without conflict. However, when accessing the domain, it ...
2
votes
3answers
46 views

htaccess rewrite for author query string when WP is in subfolder

I have successfully forbidden access to any kind of author pages whether trough /author/username/ or the ?author={#id} query string. I did this with this added to the beginning of my htaccess file: &...
3
votes
1answer
77 views

Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]

I've changed my permalinks to a custom one. When I saw my contact page was sitting on [domain]/index.php/contact instead of [domain]/contact this isn't isolated to /contact however. I went and deleted ...
0
votes
1answer
35 views

Possible htaccess configuration issue for HTTPS websites by WP Fastest Cache plugin? [closed]

I am using WP Fastest Cache plugin for my HTTPS website. The plugin once activated adds several lines of code to the htaccess file. I doubt the presence of RewriteCond %{HTTPS} !=on in the below ...
0
votes
1answer
20 views

.htaccess duplicate entries [closed]

Why my <IfModule mod_rewrite.c> has duplicated lines of code, what happend if I delete those? RewriteOptions inherit # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On ...
1
vote
2answers
32 views

Redirect to https not working with .htaccess [closed]

I have the following setup in my .htaccess file, but I am still able to go to my site via http: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$...
-1
votes
0answers
7 views

How are hackers getting past my .htaccess file? [migrated]

I run a self-hosted WordPress site on shared hosting. I have the following security setup: WordPress files in /www/ directory on server. 755 permissions on /www/ dir. wp-config.php set to 440 Complex ...
0
votes
1answer
31 views

Redirect HTTP request to HTTPS request

I am running a website that's not on Wordpress, it is built by another developer using custom framework and it is too terrible. That's what make me crazy now. Currently, I need to rewrite the request ...
1
vote
0answers
20 views

How to block access to files without modifying .htaccess or ngnix config? [closed]

I'm trying to prevent access to readme.txt files on a WP site. Normally, this would be easy by just modifying the .htaccess file or the ngnix configuration. However, the host runs ngnix, which ...
2
votes
1answer
28 views

Wordpress multisite htaccess redirection to new domain

RewriteCond %{HTTP_HOST} ^site.olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.site.olddomain\.com$ RewriteRule ^(.*)$ https://site.newdomain.com/$1 [R=301,L] All posts URLs are redirecting ...
0
votes
2answers
22 views

Migrated site - Images have 404 error

I migrated my site from localhost (LAMP) to Namecheap and it is broken in that the images it is supposed to load from /wp-content return a 404 error. I can login to wp-admin and I can see the pages ...
-1
votes
1answer
18 views

rewrite rule on plugin activation

I Have Developed a plugin. And I created a rewrite rule manually in .htaccess file. RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(\w+)$ ./...
2
votes
1answer
20 views

RedirectMatch and Redirect interfering with each other

I have the following lines in my .htaccess (there are other lines but these two are next to each other) RedirectMatch 301 ^/datingstories https://example.com/blog/category/relationships/...
1
vote
1answer
83 views

How To Fix A Redirect Chain

I hope someone might be able to help with this. My site crawl is showing that I have a redirect chain on my home page. Basically it shows I am going from : http: > https: > https://www. I need ...
0
votes
0answers
16 views

Multisite htaccess with domain rewrites

The situation is a multisite with SSL and some subsites have their own domain names. Main site is www.example.com Subsite is www.example.com/subsite1 Subsite1 has their own name of www.subsite.com ...
1
vote
1answer
23 views

.htacess rewrite condition: page to seconddomain/page

I am using a single WordPress installation for two separate websites with different domains. To redirect the second domain to its own index page I use. RewriteEngine On RewriteBase / RewriteCond %{...
0
votes
0answers
13 views

Wordpress inside wordpress htaccess

I have a wordpress installation on, let's say, /. And also another wordpress installation in /child. Thing is that I need a page from child to have a permalink like it belongs to /. I.e. somesite....
0
votes
0answers
24 views

Remove subdirectory from links

I have installed wordpress in the subdirectory "sub". I need the same content been accessed from the root and also from the subdirectory "sub". So I have created the following rewriting rules and ...
1
vote
1answer
37 views

how to combine wordpress htaccess on my root domain + php on subfolder

I apologise for a seemingly duplicate question, but none of the dozens I've looked at actually had the same problem. I have the following directory structure: /.htaccess /index.php /subfolder/....
0
votes
0answers
57 views

Wordpress not generating .htaccess but tells me that (Permalink structure updated.)

I hope someone can help me. I am configuring my new Centos 7 server with directadmin and ran into the following problem(s); my .htaccess file won't generate after saving permalinks, but says (...
1
vote
1answer
29 views

301-redirect directives for blogger to wordpress migration

Hi I am trying to move my blog from Blogger to WordPress and I want to keep a simple and clean URL structure like http://www.example.com/post-name/ In blogger, I have the following URL structure: ...
1
vote
1answer
50 views

301 Redirect domain Sub-folders to Subdomain subfolder

I have a domain and subdomain example.com and music.example.com and they are both on root directory /public_html I want to redirect example.com/music/end/ to music.example.com/music/end/but since the ...
0
votes
1answer
19 views

Prevent wordpress autoredirect

I've got a problem. My client has taken ads with ex.com/helloworld as the short URL to their new page. No problem, I'll do a htaccess redirect on it, redirect the shorturl to the right page (which is ...
1
vote
1answer
30 views

URL without www redirect directly with submission page - Multiwordpress install

This is a Wordpress related question, because the problem came from a multi-install Wordpress. But it's also related to serverside, with .htaccess My problem is : when a user type my URL without WWW, ...
1
vote
1answer
37 views

Modifying the default WordPress .htaccess with a plugin

I am developing a WordPress plugin that modifies the standard WordPress .htaccess file on the webroot folder. Currently, I inject my code inside the # BEGIN WordPress block, like so: # BEGIN ...
1
vote
1answer
16 views

htaccess redirect invoice.php to /client/invoice.php

I am looking at installing Wordpress into my WHMCS website and I would like to make it so any old invoices or support tickets go to the new subfolder. Current links will look like this https://www....
0
votes
2answers
67 views

some url does not redirect from http to https

I am trying to solve my https redirection from all away.I follow the all solutions form stackexchange. But still in problem so I am writing here. Problem is that https redirection is working but some ...
0
votes
1answer
29 views

Rewrite Url using .htaccess or hook

I have custom template and in that custom template I'm filtering data according to dropdown. I'm using GET method for filter ths data. If browser hit this url :- http://localhost/about-fruad-new/...
0
votes
1answer
70 views

Change dynamically URL to SEO friendly via .htaccess?

Is it possible to change the URL structure for the specific URL only? Currently: https://www.website.com/brochure/?brochure_id=new-year-guide Desired: https://www.website.com/brochure/new-year-guide ...
0
votes
0answers
13 views

Force HTTPS for mapped domain pointing to wordpress domain

I have a WordPress install installed and a mapped domain also pointing to the same root. Example: Installed WordPress is at example-company.com with a mapped domain being example.com. An SSL is ...
0
votes
1answer
24 views

modifying htaccess for localhost with a custom port

I have a live instance of wordpress which I'm attempting to spin up on my local machine using xampp. A brief summary of steps to where I'm currently at: configured xampp to use a custom port (8012) ...
0
votes
0answers
18 views

Page as Subdomain in Multisite Network

So I have this setup: example.com sub1.example.com sub2.example.com What I'm trying to achieve is having example.com/page as sub.example.com, mainly for consistency reasons. I played around with ....
0
votes
0answers
20 views

How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?

How come there is no error if I upgrade WordPress core after locking .htaccess' permissions to 644? I upgrade WordPress this way basically: wp plugin update --all wp core update wp language core ...
0
votes
0answers
53 views

How to block access to a folder inside of wp-content for non logged in users?

I have a custom folder inside of wp-content where I'm uploading media. I need to block direct access to this folder unless the user is logged in. Is there any way to do this? I've searched but have ...
0
votes
0answers
21 views

A plugin changes my .htaccess file and I can't access httpd.conf as that's a shared server

In a CentOS with Bash A WordPress plugin (most likely WordFence) changes my .htaccess file by deleting extraneous (Apache PCRE) directives I've added there, and I can't access httpd.conf to add them ...
0
votes
1answer
36 views

I am new in word pres my font awesome is not allow

i have error in console 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. my ht-access file look like this.. # BEGIN WordPress <...
0
votes
0answers
14 views

htaccess expires headers caching admin area

I'm having an issue where the admin area is being cached by expires headers I placed in htaccess. Here is what I had in htaccess # Leverage Browser Caching <IfModule mod_expires.c> ...
0
votes
1answer
36 views

Redirect after Permalink change - What regex do I use?

I'm completely out of my league with regex stuff. I've seen a lot of examples for putting redirect code into the .htaccess file, but the default examples are mostly for changing away from dates. ...
1
vote
1answer
107 views

Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache

How to rewrite url of wordpress rest api from http://example.com/?rest_route=/wp/v2/ to http://example.com/wp-json/wp/v2/ without changing (default) permalink structure? Need this for apache (htaccess)...
2
votes
1answer
86 views

WordPress multilingual website domain and folders

Answered & edited ! I have a single Wordpress installation on example.com. I use Polylang plugin to add multilingual system to this website. I have 16 languages, and it's configured to use ...
0
votes
0answers
14 views

.htaccess woocommerce config with static html homepage

I've got a woocommerce shop which has a static index.html as a homepage. If a customer visits the checkout the ajax requests gets the response from the the index.html page because the request is ?wc-...
0
votes
0answers
151 views

Allow REST API over HTTP, the rest of the site forced to HTTPS

I have a website with some custom api endpoints. I recently installed SSL and configured the website to redirect http visitors to https. I usually do this with the Really Simple SSL plugin. The https ...
1
vote
1answer
94 views

Multisite Redirection to new domains

I have a multisite website with 5 domains in WordPress which uses WordPress MU Domain Mapping plugin. I want to redirect every subpage to new domain, but we will be still using the homepage, because ...
2
votes
1answer
118 views

Can't access admin dashboard with wp-admin without /index.php after it

After I log in, I'm redirected to example.com/wp-admin/, which has a "ERR_TOO_MANY_REDIRECTS" message. If I type in example.com/wp-admin/index.php, everything works just fine. My wp-config.php looks ...
0
votes
1answer
26 views

How to redirect URL with subfolder to the same URL but without subfolder?

I have a WordPress site at example.com/blog. Now I want to remove the /blog subdirectory and just keep example.com. However, other sites that are referencing my site still point to example.com/blog. ...
0
votes
1answer
28 views

WordPress How to rewrite URL for custom pages

I have created Test folder in main directory having file test.php https://example.com/test/test.php?id=123&z=dnfjk after rewriting i want to create https://example.com/test/test/123/dnfjk I have ...
3
votes
2answers
213 views

Non-WordPress page in subdirectory under WordPress page

I want a non-WordPress page that can be accessed from a parent directory that is a WordPress page. For example, I want http://example.com/city/ to be a WordPress page. However, I want to upload a non-...