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
1answer
781 views

WordPress pages break with custom permalink settings (theme directory not output)

We have a site under development which works fine locally, however when uploaded to our server using the permalink settings %postname% the correct URLs are rendered in the menu but in all pages other ...
1
vote
1answer
575 views

Need help rebuilding lost htaccess file

I originally posted this on Stack Overflow (7 months ago). I didn't receive any answers and was not in a position to pursue it further. As of now I am working on resolving this, and would greatly ...
1
vote
1answer
25 views

blocking access to all post/tag URIs via htaccess

I want to block all access to the post/tag/example-here pages on a WordPress site, but the following does not work. The .htaccess access file is being parsed. It is at the root of the site (ie the ...
0
votes
1answer
23 views

I want to resolve Redirect Chain [closed]

Anyone who can guide me in this matter, I want to resolve the redirect chain? http://www.example.com redirect to https://www.example.com and then redirect to https://example.com. I want to redirect ...
1
vote
1answer
766 views

Permalinks not working on second wordpress installed in a subdirect

I have a main wordpress installed on the root and now due to a long story about incompatible plugins I need to install a second full instance of wordpress in a subdirectory. The main site works fine, ...
2
votes
2answers
32 views

Hacked website redirect, only on desktop, help with restoring it [closed]

This is my first post, I tried searching for similar problems, didn't find any that would fit my situation. Anyway. Recently my cousins website got hacked, I decided to take a look and try to fix it ...
1
vote
2answers
25 views

Site searches by Python for non-existent assets

I've recently started paying greater attention to my 404 errors in order to clean up what I can and improve my site's SEO and ranking, and have noticed something that I don't understand. In my 404 ...
1
vote
2answers
73 views

Deny access to a path (give 403 or 404 response)

I know this should be easy. BBpress creates user profiles at /forums/users/. I'd like to make them unavailable to anyone, and not be indexed by Google. I've tried the following (in .htaccess) and ...
0
votes
1answer
811 views

Multisite, different domains, optional subdirectory, and htaccess

Here's the situation: Configuration I have a WordPress multisite setup where different sites are on different domains. Some of those sites are contained in a subfolder in their domain, some are not. ...
0
votes
1answer
2k views

Why are all pages redirecting to homepage when using custom permalinks?

My website http://laptopre.net/ is running on WP 3.4.2. When I changed the Permalinks setting to Custom Structure - /%category%/%postname%/ , all the pages in my site are redirected to homepage. ...
0
votes
0answers
19 views

.htaccess to redirect to a wp page

My custom .htaccess commands are above the WP ones. This is working: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^$ wp-content/ahoj.txt [N] </IfModule> It shows the contents of ...
0
votes
0answers
17 views

Wordpress pagination broken for page 2,3 with custom permalink. Redirects to baseurl

I have a forum installed with my Wordpress site. My pagination does not work and redirects pages 2,3, or more to baseurl when they are on homepage. Here are the settings: Forum baseurl: https://...
6
votes
2answers
7k views

Does WordPress Change the .htaccess File When Updating?

I've just implemented a new WP website, replacing an older hardcoded HTML site. I will be adding 301 redirects in the .htaccess file to point the old URIs to the new WP Permalinks. My questions is, ...
2
votes
2answers
2k views

How to append a URL parameter to all outbound URLs

Is it possible to append ?ref=myref to all external URLs? If so I'm guessing I will also need to check if a ? already exists and use & if so. I'm a WP noob just coming from Joomla, any tips / ...
0
votes
2answers
1k views

How to redirect the frontend of a WordPress site (only)?

I have a subdomain http://blog.example.com I would like to redirect it to subdirectory as https://www.example.com/blog But not admin(/wp-admin). Admin area should be as it is http://blog....
0
votes
2answers
601 views

How can I create a private site that is inaccessible from the outside?

I need a safe place where I can store data about projects that I am working on. This data includes text and files (pictures, sound and video). I want to create a private "blog" for this purpouse that ...
0
votes
1answer
31 views

Htaccess file reset automatically how to fix this issue

Often my WordPress htaccess file was reset am not able to find the root cause of this issue. But I guess this may happen when installing any plugin or manually take a complete backup of the site. Also,...
0
votes
1answer
40 views

Clone WordPress for testing on localhost (with Fiddler)

My local setup for WordPress is at http://127.0.0.3/blog. When calling https://my.domain.name/blog/wp-login.php, I get the page served; including Google CAPTCHA. But the login post to a 302 redirect ...
0
votes
1answer
926 views

404 redirect based on url

I have a link like this: https://www.example.com/bh-job/38/?title=digital-marketing-intelligence-expert When I surf to the page I'm redirected 404 page because the page doesn't exisit. The page ...
0
votes
1answer
795 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....
1
vote
1answer
36 views

Wordpress: Adding Security

Regarding this answer, is correct to add the file debug.log in this way? RewriteRule (?:debug|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html|log?) - [R=404,NC,L] Kind Regards
1
vote
1answer
29 views

remove query arg from url after set query

i make migration plugin from specific script to wordpress, but i have a problem on redirect old urls to new one old urls is like book.php?view=12a34b56 and i want redirect it to book/12a34b56 i try to ...
2
votes
2answers
1k views

Question with loading 403/ 404 error pages and htaccess

I uploaded an html 403 and 404 page to my WordPress theme directory and if I hit a random mistake after .com such as .com/yyyy then it loads the 404 page for example - so all is good... However...I ...
0
votes
1answer
693 views

.htaccess RewriteRule to include post type and taxonomy

I'm trying to rewrite this url www.domain.com/gallery/?university=birmingham to an seo friendly one like this www.domain.com/uni/birmingham/gallery the (?university=birmingham) represent the ...
4
votes
1answer
41 views

Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”

I have the following problem: I made 10 WordPress sites for 1one client and now he needs me to configure the domains in his VPS. Based on some searches I did on the internet, the first thing I needed ...
4
votes
3answers
2k views

Static raw HTML page

On the server there is a static HTML page example.html in my root folder of the WordPress install. Now when a user types www.example.com/example.html I want WordPress to be smart and bypass all normal ...
0
votes
0answers
17 views

ErrorDocument 410 gives me back a 302 header

I've deleted several pages and tags from my site, and bases on my SEO recommendations I've redirected them to 410. I've done that in my .htaccess file this way: RewriteRule ^tag/lorem/?$ - [G] ...
5
votes
5answers
22k views

multisite 404 error for subdirectory

I am attempting to create a multisite as a subdirectory and I have followed the network instructions to the 'T'. The multisite seems to be set up correctly, the .htaccess and wp-config.php files seem ...
3
votes
3answers
39k views

Forbidden 403 error, permission to access, unable to read htaccess

Recently clean-installed (with exception of themes and content/upload folders) an old wordpress to the latest Wordpress 4.2.2. I continue to get this error below whenever I load files such as style....
1
vote
1answer
37 views

Redirect http to https does not work on subdir where another instance of WordPress installed

I have installed two instances of WordPress, on https://www.example.com/ and a subdirectory https://www.example.com/blogs/ Now to make all HTTP URLs be redirected to the HTTPS version, I add the ...
4
votes
2answers
2k views

Wordpress multisite subdirectory redirect infinite loop issue

Any time I create a new site on my multisite install, I get an infinite loop redirect when navigating to that site's admin. I'm using the default htaccess supplied by WP for my subdirectory install. ...
0
votes
1answer
2k 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 ...
3
votes
2answers
531 views

Cache Busting using htaccess Rewrite rule?

I am trying to follow this tutorial that says i can make a server to send a file like style.css if the requested file is style.15458888.css with a rewrite rule to be put inside the htaccess file. ...
0
votes
0answers
22 views

PHP application in sub directory keeps redirecting to main site

I've got a PHP script which I have setup in a subdirectory (public_html/phpscript) but whenever I try to access it via www.example.com/phpscript I get redirected to the main site with a 404 page not ...
4
votes
1answer
2k views

Wrong canonical link on wp-admin pages

I have a subdomain: https://blog.example.com/ I forcibly redirects to directory: https://www.example.com/blog By changing site URL and some RewriteRule on .htaccess. My .htaccess: <...
2
votes
1answer
1k views

How to properly force https and www on multisite

I have a wordpress multisite in network mode via wp multi network plugin. I've been trying to use .htaccess rules to force all urls to be https://www. eg: https://domain.com to https://www.domain....
1
vote
1answer
567 views

Redirect all posts permalinks from “.html” to “/”

How can I redirect all posts permalinks from .html to / in WordPress? To be more clear, for example, a post URL like this: http://example.com/%category%/%postname%.html To be redirected to: http:/...
1
vote
1answer
2k views

Custom rewrite rule, url returning 404

I have a custom URL like this: website.com/show/?id=9999&n=page-name and I'm trying to come up with a mod_rewrite rule to convert to website.com/show/9999/page-name/ /show/ is a page name. ...
0
votes
1answer
49 views

URL rewrite for mu-plugin assets

I have a semi-bespoke scenario, but one that works best for out environment sharing the code workload and accessibility (and version control). We have a multisite that all abide by the same core ...
1
vote
1answer
831 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 ...
3
votes
1answer
3k views

Getting a 500 internal server error ONLY on wp-admin/options-permalink.php

I have access to the admin panel, and everything works fine. I can click settings->reading and change anything I want to. But if I click settings->permalinks I get a 500 internal server error. Here's ...
0
votes
0answers
29 views

Stop home page redirect to subfolder

I have a confusing issue! my home page redirect to subfolder! other pages are ok. just home page makes me confused. fidanfilm.ir .htacces on root is RewriteEngine On RewriteCond %{HTTPS} off ...
1
vote
1answer
508 views

301 Redirect Old URL to New Wordpress Page

I just migrated one of my old websites to wordpress but running into issues with the 301's of the old url's old url /11/companyname new url /office/companyname/ This is the code i came up with ...
0
votes
1answer
1k views

Pagination redirect set in .htaccess file is not working

I'm trying to redirect like below but it's not working. http://example.com/page/2 -> http://example.com/item/page/2 Below is the source of .htaccess file: RewriteEngine On RewriteCond %{...
3
votes
1answer
4k views

Multisite Subdomains result in 403 Forbidden

So I have setup multisite as per the WordPress website page: https://codex.wordpress.org/Create_A_Network I'm using the latest WordPress 4.8. Setup example.com sub.example.com All requests for ...
1
vote
1answer
1k views

What is the right way to redirect all traffic to HTTPS?

What I want to do I manage a website on a hosting service that recently enabled the option to activate a free SSL certificate. I want to redirect all my traffic to the HTTPS version, and make it so ...
-1
votes
1answer
13 views

Comment reply href is different on production vs local

So I can reply to comments on local but it doesn't work on live. I can reply via the admin panel but when I click reply on a comment on a single page, it doesn't work. I checked the code and it seems ...
2
votes
2answers
2k views

Why wordpress multisite redirect to wp-signup if site exists?

I just create a site on my Multisite domain (example.com), for instance site1.example.com After this, I try to enter on https://site1.example.com/wp-admin, but I'm redirected to https://www.example....
0
votes
1answer
29 views

How can I redirect users on the new 404 page without plugin?

I have a 404 page in my theme but I am not using that page. I have created a new 404 page in WordPress using wpbakery page builder. I need to know how can I redirect users on the new 404 page without ...
0
votes
0answers
22 views

Wordpress Multisite determine the correct domain to be set as current/default domain when setting multisite in Local fresh installation

I am unsuccessfully trying to setup multisite with Wordpress's fresh setup(Wordpress installed in subfolder under htdocs of Localhost), but existing copy of Database already imported(provided by ...

1
2 3 4 5
24