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

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

How to write .htaccess so that https is on for subpages only but not the home page

The root of my domain successfully redirects to a subdirectory, meaning example.com redirects to example.com/abc example.com has no WordPress install. example.com/abc has its own WordPress install. ...
0
votes
1answer
16 views

Redirect only PDFs in different folders?

I need some help with google indexing old PDF pages. Here is the situation: I have a new URL of new.example.com. The website was rebuilt and the company name has changed. The URL used to be old....
0
votes
2answers
24 views

I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php

I am actually building a custom theme for my blog and I use single quotes for HTML everywhere like: <div class='div'></div> Does this cause me redirection to index.php?? My site ...
0
votes
0answers
32 views

Need Help with .htaccess to Make Pretty Permalinks Work

I am in a huge problem where my blog is being redirected to 404 error page when I use %postname% permalink but %plain% permalink works fine. Let me tell, I have made a custom theme for my WordPress ...
1
vote
2answers
33 views

Force www to non-www on a subdomain in WordPress?

Forcing www to non-www is simple at the primary domain level. What about at the subdomain level? If I am correct the "issue" is that it is at two levels of depth so you can't force a subdomain to be ...
6
votes
3answers
828 views

Does this .htaccess security setting really work?

What does this .htaccess do? Am I correct in thinking that all it does is prevent automatic brute force attacks? So, to access the wp-login.php you have to manually type in the URL of the domain so ...
1
vote
0answers
24 views

Alias 'wp-content' directory to something shorter (framework?)

I recall seeing this as a feature of a Wordpress Development Framework, so I know it's possible (can't remember the framework). I am interested in how to condense the Wordpress-generated urls to ...
0
votes
0answers
11 views

Windows IIS7: Wordpress redirecting to home page after press login submit button

I have setup the WordPress website on windows IIS7 web server with MySQL. Through the IP address my website and admin login is working fine. But after i switched the IP to URL(https://www.carine.ae) ...
1
vote
2answers
30 views

How to redirect subcategories to a page?

I want to redirect all subcategories who belong to the category named symptoms to a same page. I did this: RewriteRule ^category/symptoms/(.*)$ https://my-site/com/list/$1 [L,R=301] Wordpress ...
0
votes
1answer
16 views

Non-wordpress subdomain on Multisite Installation

I have Wordpress multisite and I want to exclude one subdomain from multisite. I am a little bit confused. Wordpress multisite directory: /var/www/XYZ (domain example.com, subdomain: 1subdomain....
1
vote
0answers
26 views

How do I configure wordpress structure for development using git and composer

I've been developing in other languages and web frameworks and I'm now starting with a Wordpress project. I'm used to using git and a package manager, but Wordpress development poses some unique ...
0
votes
0answers
22 views

Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN

I followed many tutorial about leveraging browser caching nevertheless I couldn't configure it succesfully, in fact GTmetric (PageSpeed and YSlow) notified me many static file that don't have a cache ...
1
vote
0answers
9 views

Admin Panel Slowdown After SSL Verification

a few days ago I did SSL verification for my website. I've imported the following rules on IIS after receiving the http 500 error frequently today. <rule name="Imported Rule 1"> ...
1
vote
1answer
33 views

Https Redirect infinite loop in Mobile browsers

I have recently installed SSL on my website and made some changes in htaccess to rewrite http to https routes. It is working perfectly fine in desktop browsers but not in Mobile browsers. Not sure ...
1
vote
1answer
25 views

Redirect All Search Links Containing - to + on Wordpress

I deleted all my wordpress tags via phpmyadmin, and most of my post content contains tag links, now I redirected all the tag links to search using .htaccess, I.E example.com/tag/stack-exchange/ ...
0
votes
0answers
30 views

Deny php execution in /wp-includes - using .htaccess in /wp-includes VS root folder

Trying to secure my WP site. In an attempt to deny php execution from the wp-includes folder wondering if these two methods are effectively doing the same thing? 1) add new .htaccess file to root of ...
1
vote
1answer
22 views

Only Allow Front End Access

I am new to wordpress and am looking at a way to only allow users access to the front-end of my site. It is a one page vlog site, but I am forcing users to register to view. Is this handled in wp-...
1
vote
0answers
27 views

Wordpress category with 404 error

Okay, so I'm facing a weird problem as I'm receiving 404 errors on blog category pages and I already did the most popular tricks to solve it, such as: re-install Wordpress update permalinks update ....
0
votes
0answers
21 views

How do I fix my 404 error

I hope you can help I changed my website url from http://www.dynotorque.co.uk to https://dynotorque.co.uk without getting an SSL cert. After this my website would no longer load and all i would ...
0
votes
0answers
28 views

Events Calendar Multisite 404 for events

I haven't seen any solutions that work for me or apply to my use case. but, I have a url like https://www.example.com/site1/event/some-event-2017-01-17/2018-08-30/ this will throw a 404 page not ...
1
vote
0answers
42 views

Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page

I'm migrating a site between hosts and am having issues with what should be(!) a fairly simple rewrite of a "pretty" URL to display posts filtered by category. domain.xyz/category/cat_name/ => ...
-1
votes
1answer
14 views

Restricting direct downloads of wp content files, but allow them on the website.

I have a wordpress and have looked at many solutions. The most common one is the .htaccess and when I do that, it doesn't work? I want to embed youtube videos from the "offical" youtube on my ...
1
vote
2answers
36 views

Plain permalinks not working!

For my wordpress website plain permalinks are not working. The post url is changing but when we click on the post its not redirecting to the post page. It will be in the home page itself. For example:...
1
vote
1answer
51 views

Redirect htaccess does not work correctly with my new wordpress site

I have an old website that works fine (www.example.com). I have created a new website (www.example.com/wordpress) and I thought I could use .htaccess to redirect as I've done it for other html ...
2
votes
1answer
62 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
31 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
18 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
66 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
190 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
83 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 ...
1
vote
2answers
108 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$...
0
votes
1answer
32 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
21 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
46 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
47 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
22 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
31 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
432 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
32 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
14 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
30 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
44 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
205 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
45 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
298 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
21 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
57 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
88 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
17 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....