Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

6
votes
6answers
993 views

Removing the dot or period from htaccess files - A dangerous move?

Removing the dot or period from htaccess files (and thus making it unhidden) - A dangerous move? I tried to search in Google with the string: Can I remove the dot htaccess But I didn't find anything ...
3
votes
2answers
132 views

jQuery not loading from CDN

I have a custom CMS, and for some reason jQuery will not load from the CDN. After sitting on this for days, I remember I made a change the the .htaccess file but not sure if it's really the cause. ...
-1
votes
1answer
45 views

I've changed my site's domain, created a redirect, but old URLs result in 404

I've changed the domain of my site, created a redirect, but it seems to work only partially. That is, when I go to example.co.il (old) I do get to example.biz (new). But when I go to example.co.il/...
1
vote
1answer
63 views

Rewrite rules in .htaccess never take effect and no redirects ever happen

I recently set up a vps with digital ocean to let my site run on php7 and http2 Everything is running great but my sites .htaccess file is not redirecting as it should. I have changed up my 000-...
3
votes
1answer
92 views

htaccess with regex not working properly!

I can't seem to get the regex in my htaccess redirect working: RewriteRule [\./:_a-zA-Z0-9]*\/(web-browse(r|rs)-benchmarks)[a-zA-Z0-9-/\.:?=]*(|html) /web-browser-benchmarks-firefox-chrome/ [R=301,L] ...
0
votes
0answers
14 views

Redirect site 1 to site 2 from site 2? [duplicate]

We have two web servers: one with domain "www.sitename.com", and another with "home.sitename.com". Is it possible to do a mod_rewrite from the home.sitename.com server htaccess file that would ...
2
votes
1answer
27 views

Redirect all pages within subdirectory to new page

After redoing my webshop, I need to redirect every URL within a certain directoy to a new page. All URLs beginning ith example.com/shop/... should be redirected to the page located at example.com/...
3
votes
1answer
65 views

Creating a Combined 301 Redirect in .htaccess

We are being advised by our SEO agency to reduce the number of "chained" redirects we have. So, for example: URL A - http://www.sitename.co.uk/SHOPPING-CATEGORIES/product_name redirects to its https ...
3
votes
1answer
55 views

Trouble with 301 redirect of old naked domain to new domain

Using .htaccess I am trying to setup a simple 301 redirect which redirects both exampleA.com and www.exampleA.com (the old domain) to exampleB.com (the new domain). However, accessing www.exampleA.com ...
2
votes
1answer
47 views

How to customize youtube url to dynamic pretty url? [closed]

I am creating seo friendly links for my site. I am succeeded in creating all link just the data fetch from youtube using Api is creating an ugly and long link i want is there any way out to make that ...
1
vote
2answers
74 views

Where to place 301 redirects in the .htaccess file on a WordPress site

I edited my .htaccess file earlier to redirect from www version to non-www, and it is working correctly. However, now I have some page redirects I need to do. I am looking at the .htaccess file, and I ...
2
votes
2answers
80 views

Rewrite rule for pretty URL: redirecting 'index.php?parameter' to 'slug/index.html'

My original URL is: http://example.com/video_in.php?video_id=1 and I want my link to be: http://example.com/shaandaar/kinna_sona.html shaandaar and kinna_sona are the slugs in my database....
2
votes
1answer
67 views

http header if not modified help

I am having a little trouble with sorting out my HTTP headers for my sites. I am currently setting up Varnish on my server and so trying to get everything working correctly. All my sites are ...
1
vote
1answer
105 views

An equivalent to ProxyPreserveHost in .htaccess?

I am moving a website from one shared host to another. The site is all files. I have already copied the files to the new host. I'd like to redirect all HTTP requests from the old host to the new ...
3
votes
1answer
41 views

htaccess Redirect everything to index.php little trouble

I need to redirect everything (www.example.com/, www.example.com/en/, www.example.com/en/index.php?do=xyz, etc.) to index.php, but I can't get everything working. 1st try: RewriteCond %{...
2
votes
2answers
133 views

htaccess need automatic redirect + language + SEO urls

I am trying to achieve more things: HTTP:// should redirect to HTTPS:// www.example.com should redirect to www.example.com/en/ or /it/ depending on client language links should resolve to www....
1
vote
1answer
202 views

How to match only part of URL and redirect URL with parameters in .htaccess?

I have a number of links with similar structure: example.com/index.php/path/some-path/some-subpath?parameter=1 Which I want to redirect just to example.com/category/ But I want to match only the ...
1
vote
2answers
97 views

How to remove Plesk websites temporary urls from Google index?

Google is indexing Plesk temporary URLs, I've tried the following tip but it does not block those URLs. Why Google indexed the preview URL of domain? I added this to .htacess with no success: ...
2
votes
2answers
44 views

How can I use .htaccess to make old link retrieve content from new location?

One of my sites had a WordPress site in the subdirectory (root)/blog/. Using rules in .htaccess, the site was called up without the /blog/ in the URL. I recently changed it by removing the /blog/ ...
3
votes
2answers
65 views

Writing clean urls with .htaccess

Update - Alright thanks everyone for your tests, it really helped. The code is good. My problem was not having absolute "/" links. (Due to moving from public_html folder). Only 2 concerns i have now. ...
0
votes
0answers
7 views

We cannot stop subdomains redirecting to the main domain [closed]

The subdomains of our website besthomecarefranchise.info keeps redirecting back to the main site, you can see it here, http://raymondadamcik.besthomecarefranchise.info/, we've spoken w/ the techs here ...
1
vote
2answers
126 views

How to create Short URL in Mediawiki without getting an 403 Forbidden Error in Apache?

How to create Short URL in Mediawiki without getting an 403 Forbidden Error in Apache? My httpd.conf: #### Wikibase (BETA) <VirtualHost *> ServerName wikibase.isc ServerAlias ...
0
votes
0answers
49 views

How to redirect all pages and all subdomains of a domain to the home page of another domain

I have an domain (www.aaa.com) and an alias (www.bbb.com). The alias domain points to the aaa.com domain, but that's not what I want. I want www.bbb.com to point to www.ccc.com. I have the following ...
2
votes
1answer
93 views

How to redirect a URL without a query string to a URL with a query string?

I've looked around for the answer to my question but only to be confused even more. I'm hoping somebody can help me... I need to redirect this URL: http://www.example.co.uk/ecommerce/cabinets/...
6
votes
1answer
94 views

301 redirect away from content that is served with a reverse proxy to prevent duplicate content

I am currently struggling to resolve an issue stemming from a reverse proxy. We are running a reverse proxy from page.example.com to example.com/page/ . This original subdomain content is generated ...
1
vote
0answers
24 views

False Duplicate Content On Moz Report

We are using Salesforce's Visualforce to run one of our websites. We use Moz to monitor SEO issues. Moz has identified more issues pages than we have - see the attached image. We have only a few ...
4
votes
1answer
118 views

How to redirect URLs with a specific IDs to new URLs on a new domain name?

I want to redirect all pages where there is a specific word inside in the URL. Both websites have the same articles. For example: videos.example.com.ph/its-showtime-hashtags-hashtags-and-dawns-...
3
votes
1answer
78 views

Using .htaccess deny returning 302 and not 403 forbidden

I'm in the process of adding yet another layer of security to some of my WordPress installs, since some of my customers sites use shared hosting, and generally they do not ban users for brute force ...
3
votes
1answer
54 views

Redirect percent encoded URL in .htaccess

Suppose I have the following URL: http://example.com/%D8%B3%DB%8C%D8%B3%D8%AA%D9%85-rss-%D8%B3%D8%A7%DB%8C%D8%AA-%D8%A8%D9%87%DB%8C%D9%86%D9%87-%D8%B4%D8%AF/ How can I redirect this to http://www....
2
votes
1answer
31 views

Query string parameters with mod_rewrite

RewriteEngine On RewriteRule ^detail.html?id=([0-9]+)-page=([0-9]+)$ detail.php?id=$1&page=$2 I rewrite URL detail.php?id=1&page=1 to detail.html?id=1&page=1. I always get the 404 errors....
3
votes
2answers
190 views

How to submit shortened URLs to Google so that they are included in the index

I am working on a project to create a URL shortener. I have successfully gotten it to create short URLs, but I would like to submit them to Google. When I submit a short URL via Google Webmaster ...
2
votes
2answers
54 views

Use .htaccess to remove a subdirectory from a URL when it in turn has a subdirectory

Could anybody please tell me how to rewrite http://example.com/forum/topic/topic-name to http://example.com/topic/topic-name I do not want to simply rewrite http://example.com/forum to http://...
0
votes
1answer
26 views

Did httpd can be rewrite? [closed]

I'm running on Nginx server. I try to rewrite my URL using .htacces file: RewriteEngine On RewriteBase / RewriteRule ^search/(.+)/page=(.+)$ search-results.php?q=$1&page=$2 It give me Internal ...
1
vote
2answers
81 views

.htaccess rewrite with % in query string doesn't work

I am trying to do a rewrite of the site from http://www.example.com/folder/site?data%5Bbranch%5D=xyz to http://www.example2.com/test/ Already tried the query string but facing issues with %. Any ...
0
votes
1answer
31 views

Creating sub-directories in public_html without effecting higher scope files ( index.php )

I have in my Navigation bar: "example.co/index.php (home), example.co/action.php, example.co/car.php /etc". Now I have my games in the "/games/" directory But once I click on a game in /games/ ...
2
votes
2answers
59 views

mod_rewrite ignore Stylesheet and JavaScript

I have a mod_rewrite to allow example.com/location as example.com/?page=location RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} !^page RewriteRule ^(.*)/?$ /?page=$1 [L] But how do I ...
3
votes
1answer
222 views

.htaccess syntax multiple RewriteEngine on

I'm learning to maintain my own WP site. After a lot of reading I ended up with my "complete" htaccess file that looks something like this DirectoryIndex index.php # Disable directory listings ...
0
votes
0answers
5 views

Excluding a file from an IP block [duplicate]

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
2
votes
0answers
87 views

RequireAll blocks overriding each other

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
2
votes
1answer
44 views

My subdomains to a folder won't work

I'm trying to host a WordPress network. Though, the network doesn't work with the built-in WordPress subdomain redirection, that's why I create directly the subdomains at my host (legtux.org, a free ...
2
votes
3answers
156 views

How to avoid MP3 downloading sites from using my files?

I have a WordPress site where I'm gonna host files such as MP3s. The thing is I know if I don't do anything, MP3 Crawlers like mp3glu or mp3pleer will come and use my files and bandwidth, which I don'...
2
votes
0answers
37 views

Separate multiple domains with htaccess (solution works on one hosting, not on another)

I have two different domains on one VPS. It's Apache 2.4.7, I remember trying long to set up name based Virtualhosts on localhost to find out Apache Virtualhosts are not supported anymore. (I cannot ...
1
vote
1answer
14 views

how to prevent load image on special sites [duplicate]

how to prevent load my website images on special sites because many websites hotlink my website images How to Detect and Stop Image Hotlinking on my Website thanks
2
votes
2answers
69 views

How to change whole folder from http to https

The checkout/onepage is working with HTTPS. But, why checkout/cart is not? Here is fragment of the .htaccess: ############################################ ## enable rewrites Options +FollowSymLinks ...
1
vote
3answers
49 views

Regular expression for Apache redirection

In the .htaccess file I would like to redirect (301): From: http://www.example.com/photo<anything> To: http://www.example.com/blog/ Basically, any URL starting with /photo should be redirected ...
0
votes
1answer
45 views

Google not updating title with htaccess expires

It's been 2 weeks I've changed my website title and still Google hasn't changed the title in search engine. I think it's because of if modified since header... my website is generating 201 OK status ...
2
votes
2answers
160 views

Forcing HTTPS and WWW with apache

Apache does not force HTTPS in a subfolder of a folder, but it works in the first level subfolders. Here are all the HTAccess snippets I have tried: RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"' ...
2
votes
2answers
86 views

Redirect to non-www and non-https in htaccess

I need to redirect my WordPress blog from https://www.example.com/blog to http://example.com/blog using the .htaccess file. This is what I have so far: <IfModule mod_rewrite.c> Options +...
1
vote
1answer
46 views

Use .htaccess to convert user ID's to usernames? [closed]

I want to use .htaccess to convert the urls that link to profile pages from an ID number to a name. For example, on Facebook, if you were to go to: https://facebook.com/profile.php?id=4 It would ...
2
votes
1answer
200 views

Multi-language site, landing page

Couldn't find a similar question here, and seems kinda simple, so sorry if this has been asked before. I'm developing a site with dual language, setup in the following format: http://www.example.com/...