Skip to main content

Questions tagged [htaccess]

Directory-level configuration file found mostly on Apache web servers

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

How solving the problem with three slashes in WordPress URLs

I'm writing because I have a problem that I can't find a solution to. Google Search Console tells me that my site has over 30 pages in the "Page crawled, but not currently indexed" section. ...
Andrew P.'s user avatar
3 votes
1 answer
161 views

Apache2: How to block a range of IPv6 addresses in .htaccess?

My website gets flooded with requests from the following IPv6 addresses: 2a03:2880:13ff:4::face:b00c 2a03:2880:22ff:3::face:b00c 2a03:2880:11ff:d::face:b00c 2a03:2880:13ff:9::face:b00c 2a03:2880:15ff::...
Daniel Baettig's user avatar
1 vote
1 answer
65 views

Error index page because of htaccess

My desktop index.html cannot be validated by Google Search Console. The error is " page with redirection ". I made a redirection for mobile users on the m. version of my website. Google is ...
Pixelkomando's user avatar
0 votes
0 answers
15 views

.htaccess - Trying to remove /profile/ from urls

RewriteOptions inherit Options +FollowSymLinks RewriteEngine On RewriteRule ^profile/([^/]+)/?$ https://example.com/?username=$2 [L,QSA,NC] RewriteRule ^profile/(followers|friends|saved|stories)/([^/]+...
DJ PVMA's user avatar
0 votes
1 answer
52 views

Redirect to Accept-Language with Default

I have a website that offers ten UI languages. The root (https://example.com/) redirects via htaccess to subfolders (https://example.com/en https://example.com/de etc.) depending on the user's browser ...
Armin Hierstetter's user avatar
0 votes
0 answers
20 views

APEX domain pointing to the right IP address returns 403 while www works

First time using Microsoft Azure. I'm using Azure App Service for WordPress for my site farminguru.in for which the A records points to the correct IP address mentioned at Networking in Azure. DNS is ...
Farminguru's user avatar
0 votes
0 answers
30 views

RewriteRule on local stack works, but not on server

I have a .htaccess file with a basic rewrite rule wich works fine on my local stack, but it does not work on the shared server. RewriteRule ^wp-content|wp-login/? - [L,R=404] What am I missing?
Thomas's user avatar
  • 1
0 votes
0 answers
62 views

redirecting www to non-www including subdirectories

I have WordPress installed to one of my subfolders. I also have subfolder with a folder inside containing index.html inside the WordPress folder. Now, I'm redirecting all www to non-www URLs using ...
goodnight sir's user avatar
1 vote
1 answer
92 views

htaccess - redirect all URLs ending in digits

I need some help with an .htaccess redirect. Here's an example. Some of my webpages will look something like this... https://www.example.com/my-folder-name/my-file-name-12345678.php. Some pages will ...
CheeseFlavored's user avatar
2 votes
1 answer
140 views

.htaccess redirect from HTTP to HTTPS and add canonical

I am having a few problems with Google search console not validating any of my self hosted WordPress blog pages and I have tracked it down to (I think!) a redirect from HTTP to HTTPS. This is my ....
Melanie Phillips's user avatar
3 votes
1 answer
701 views

Redirect double-slash "//" URLs using a rewrite rule in the .htaccess file

Google Search Console is giving me the Duplicate without user-selected canonical error for URLs that contain an unnecessary double slash // in them, like: https://university.edu/~user//dir/ To avoid ...
Mike Pierce's user avatar
0 votes
0 answers
338 views

How to block unwanted bot in Apache 2.4?

These rules work good in my .htaccess: #https://workinnet.ru/de/wie-man-amazonbot-blockiert/#German language# SetEnvIfNoCase User-Agent "Amazonbot" blocked_bot <Limit GET POST HEAD> ...
josefus's user avatar
0 votes
0 answers
12 views

Trailing Slash for home page redirect? [duplicate]

While redirecting a page to the homepage, is there any problem if I add a slash to the homepage in my .htaccess file? Currently the homepage doesn't have a slash in the URL.
christy andrews's user avatar
0 votes
0 answers
122 views

Htaccess won't work with RewriteMap

When the URL link is changed in the administrative panel, and a new map is generated for Apache, I'm encountering an issue with the .htaccess file configuration and RewriteMap. In my Apache ...
Mantykora 7's user avatar
0 votes
0 answers
137 views

Duplicate, Google chose different canonical than user after redirecting to HTTPS and Non-WWW via HTACCESS

I have redirected the www version and http version to non-www and https so the URL will be like https://website.com using the following .htaccess code: RewriteEngine On RewriteCond %{HTTPS} off ...
Milan Bastola's user avatar
3 votes
2 answers
478 views

Building a webcomic: How to redirect URL to latest slug using htaccess?

I'm inexperienced with coding. I have a comic that creates new pages as /?pg=pagenumber I want visitors to be redirected to the latest page. So when they type: https://example.com they get redirected ...
redmoon321's user avatar
0 votes
0 answers
36 views

SEO Impact: Rewriting image urls in htaccess

I'm currently looking to leverage Cloudflare Image Resizing on a sizeable Wordpress multisite network. Changing all the image requests across the site to reflect the Cloudflare URL is of course going ...
Simon Bennett's user avatar
0 votes
1 answer
56 views

htaccess stops after reforming url before redirect

I want to be able to have the an URL be reformed in an htaccess file and redirect a file that is no longer present. Taking this: http://www.example.com/foo/thing.htm and having this be renamed to: ...
Chris J. Popp's user avatar
1 vote
0 answers
54 views

How to redirect wildcard and non-wildcard differently?

My customer had a single WP site at example.com. This was changed so that on that address is only be a static page, a landing page, with an election to choose between two WP sites which locate at ...
Juha Metsäkallas's user avatar
-1 votes
1 answer
151 views

htaccess and redirects

I'm wanting my URL to resolve to https://example.com if the visitor is typing in the URL with http://www or http:// or https://www Right now I have a redirect in my htaccess and it works but I get ...
Chris J. Popp's user avatar
0 votes
1 answer
209 views

Help with HTACCESS 301 Redirect to different site with URL parameters

I have two websites, elijahstreams.com (OLDSITE) and projectjustcause.com (NEWSITE). I need ID-based URLS to forward from OLDSITE to SEO-friendly URLS on NEWSITE via .htaccess directives. This is what ...
Eric Hepperle - CodeSlayer2010's user avatar
1 vote
2 answers
116 views

HTTPS site on Chrome with paid SSL showing as Dangerous

I built a WordPress STAGING site on projectjustcause.com domain. I have installed and tested paid SSL cert and it worked fine. When I added directives to APACHE 2.4 .htaccess file to forward all http ...
Eric Hepperle - CodeSlayer2010's user avatar
1 vote
2 answers
81 views

Is it possible to transfer an old domain to a new subdomain?

Is it possible to move an old domain to a new subdomain permanently without losing search engine rankings? For example, going from https://www.example.com/ to https://blog.newexample.com/?
sarah mxs's user avatar
0 votes
1 answer
79 views

Problem to detect security script like X-Frame through .htaccess file in WordPress and how to trace and find the problem?

I transferred my WordPress website from a hosting company to a virtual machine. I want to add some security scripts like X-Frame, CSP, and HSTS. Before that, I edited the .htaccess file from the ...
Mohsen Akhavan's user avatar
0 votes
0 answers
209 views

Can't Find a Solution for Removing Trailing Slash at End of Directory URL

Please help me get my URL folders to point to index.php without a slash at the end. I tried this guide, but all I get is a URL with the slash at the end of it. The computer displays the right page, ...
Neo's user avatar
  • 1
2 votes
1 answer
228 views

Bing site scan: Avoid Error 403 if index.html is missing the root domain name

I have a website with the following domain name: https://example.com (there is no index.html in the root domain name) I have the following redirect based on language detection in .htaccess: https://...
Goemon Code's user avatar
0 votes
0 answers
127 views

Redirecting old domain to two new domains

The issue at hand is redirecting selected pages from the olddomain to the newdomain1 and newdomain2. Doing one domain is fairly straightforward, but it's different when handling two domains. Any ...
nickhiebertdev's user avatar
1 vote
1 answer
414 views

htaccess redirect with negated conditions

Simple redirect in .htaccess works: #Redirect 302 / https://domain.toberedirected.com But the conditional one doesn't. I want that if the remote user IP address is in the list then ignore the ...
user109077's user avatar
0 votes
1 answer
256 views

How to use mod-rewrite for SEO friendly get params?

At present the webpage accepts get params like this https://TripTale.in /details.php?id=AlphaNumericKeys Which I want to make it look like https://TripTale.in /details/someTexts/AlphaNumericKeys ...
Sourav's user avatar
  • 123
0 votes
1 answer
40 views

301 Redirect a domain to new domain and add extra subdirectory to the existing path

i want to redirect my old domain to new domain x.com - y.com and also, my old domain x.com currently doesn't have sub directory in url ex: x.com/news-today for my new domain y.com having sub ...
Surya Tej's user avatar
2 votes
1 answer
439 views

Google is accidently indexing query string URL parameters and causing my website bandwidth increase

Google is currently indexing query strings URLs of my website. Google has currently indexed almost 112k URLs that all are duplicate version of other URLs causing my website to slow down and negatively ...
mehtab fatima's user avatar
2 votes
0 answers
53 views

Redirect the bare domain to a subdomain and still make the bare domain appear to users to fix a CSP error that occurs when using the bare domain?

I'd be grateful for some guidance with URL redirects in the .htaccess files as I'm not sure how to handle (though I hope it's straightforward). I've installed a site into a subdomain, let's call it ...
woof's user avatar
  • 21
2 votes
2 answers
585 views

Edited my .htaccess file and now website is downloading, not displaying anymore

I made changes to my .htaccess file and now the website is not loading anymore. Instead, it just downloads a file called "download". This happens on Google Chrome, but on Safari the website ...
Michael M.'s user avatar
2 votes
1 answer
165 views

.htaccess rewrite does not work with adwords gclid passed to the final url

Have a problem with traffic coming from Google Ads. A have a redirect roll that redirects https://example.com/some-words-words-aktivitet/ to https://example.com/index.php?mobile=1 (RewriteRule ^some-...
user3699041's user avatar
1 vote
0 answers
176 views

My wordpress posts wont get indexed/displayed anymore in Google image search

Suddenly my website seems to be locked out of Google image search. None of the articles of the website get indexed when I search, however search console says the urls are getting crawled. I have ...
Hans's user avatar
  • 63
3 votes
1 answer
466 views

Alternate page with proper canonical tag - htaccess rule

I have been receiving lots of canonical error messages from Google Search Console. Most of the time, the referring pages are my own pages and the urls are correct in the referring page. Google is ...
Trebor's user avatar
  • 3,290
10 votes
2 answers
9k views

AH10411: Rewritten query string contains control characters or spaces

How to reproduce the error: -- A space in my URL will trigger the error. Observation of the error: -- It seems to happen suddenly since around 3/10. ---- I did not upgrade my Apache version, but it ...
Chi's user avatar
  • 101
9 votes
1 answer
4k views

RewriteRule started returning 403 Forbidden error

I have a website that uses a set of quite simple RewriteRules of the format: RewriteRule ^p/(.*)$ /product.php?$1 [L] All was working well and still is working perfectly fine on localhost. For some ...
Jimbo Vader's user avatar
0 votes
1 answer
280 views

Remove sub folder name from URL

http://example.com/portal/reports/data.php?id=2 In this URL I want to hide portal folder in the url/: http://example.com/reports/data.php?id=2 How can I achieve this using mod_rewrite? I used online ...
Ram Gowda's user avatar
1 vote
2 answers
410 views

Is it possible to restrict the access to a website with a login/pwd tuple without having access to the Apache config?

I only have a web hosting solution which doesn't include a server config access, this is a mutualized solution. I would like to try to allow users to access my website only if they have the expected ...
Another Dude's user avatar
1 vote
2 answers
2k views

How can I redirect a PDF to home page?

I'm trying to redirect from an URL like this: https://example.com/images/qr/brochure.pdf to the home page of the site: https://example.com I tried using this code in a .htaccess file, and added the ...
shiny01's user avatar
  • 13
0 votes
1 answer
144 views

How can we redirect all pagination URL to main page

We want to redirect https://www.example.com/blog/category/mobile-application/page/2/ to https://www.example.com/blog/category/mobile-application/ or all blog category pagination to the main category ...
dipanshu's user avatar
0 votes
0 answers
18 views

Check if old URLs that are redirected are receiving traffic and they are active [duplicate]

So I took over a web with almost 10.000 redirects created in .htaccess file which is ridiculous. The domain is more than 15 years old. I want to remove redirects that are no longer needed for the ...
Fra Citat's user avatar
1 vote
0 answers
22 views

Block specific C range of IP addresses [duplicate]

I can't find a good reference though my understanding is that ranges in an IPv4 address are: a.b.c.d I wish to block only the C ranges starting with 51.15.51.0 and ending with 51.15.142.255. I have ...
John's user avatar
  • 153
1 vote
1 answer
187 views

Redirection of Spams hacked page 404 to 410 .htacess

My website has been spammed by hackers for maybe 1 year. So now I have to update everything I think. And it seems that the page targetted by spammers is going to 404. My question : I tested this ...
JIRAKO's user avatar
  • 11
2 votes
1 answer
186 views

.htaccess redirect php WHMCS cart ID

For WHMCS I am trying to redirect products to another ID and subdomain. How can I create a .htaccess that will redirect https://www.example.com/clients/cart.php?a=add&pid=17 to https://clients....
Toodarday's user avatar
  • 123
2 votes
1 answer
101 views

Redirect 301 a URL already created by a rewrite rule in .htaccess

I'm creating SEO friendly URLs with rewrites in .htaccess. Now I need to redirect (301) a couple of these rewrites, and have no idea how to do that. These lines: Options +FollowSymLinks RewriteEngine ...
Aknot's user avatar
  • 123
2 votes
3 answers
985 views

Why do I have to enter basic authentication credentials twice for WordPress with .htaccess?

I protect the wp-login.php file via my .htaccess file: <Files wp-login.php> AuthName "Admin-Bereich" AuthType Basic AuthUserFile /*path*/htdocs/.htpasswd require valid-user </Files&...
dajana.s's user avatar
  • 161
1 vote
0 answers
14 views

Is RewriteMod for WordPress site: site.ro -> site.com/?lang=ro possible?

I'm not much of a WordPress specialist - is it possible to redirect new domain to the same site, but with ?lang=ro query parameter so it shows the old site with selected language? Result I want: site....
jean d'arme's user avatar
1 vote
1 answer
87 views

WordPress doesn't identify the subfolder

I have a subfolder with a separate WordPress running on it. When I click on a link which should lead to the destination in the new website (the subfolder) it reads everything except the mentioned ...
Majid Marashi's user avatar

1
2 3 4 5
34