Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
28 views

Using SetEnvIf to not log overly accessed URLs

I'm trying to figure out how to craft my SetEnvIf's in my apache config so that the server hard disk isn't spinning 24/7 over log entries. What I want to do is disable logging for all domains and ...
1
vote
0answers
21 views

Could an .htaccess affect charset options in another directory?

My company is still running a ~12 year old CMS for project management and until yesterday it was working fine. Then I uploaded a version of Tiki Wiki CMS to complete separate folder on the same ...
3
votes
2answers
68 views

Redirecting all pages to new website homepage using .htaccess

I want to direct all of the pages (around 700) from my old website, to the homepage of my new website. I found this method to be used in .htaccess: redirectMatch 301 ^/ http://www.newwebsite.co.uk ...
2
votes
1answer
36 views

Subdomain showing incorrect content when going through HTTPS

I have a domain on my server called example.com and I set up a subdomain called links.example.com. Whenever I go to links.example.com, the domain is pointing to the same directory, even though in the ...
2
votes
2answers
70 views

How do I link to web pages with umlauts in their filename?

I am trying to create an HTML link to a web page hosted on an Apache server that contains umlauts (in my test case it is ä.html). So I tried the following in HTML: <a href='ä.html'>ä.html</...
3
votes
1answer
111 views

.htaccess mod rewrite sub directories redirect loop

I am trying to setup a sub-directory with individual .htaccess. I want to redirect .html files to url without extensions and also add a trailing slash and redirect all non-slashed urls there. Here's ...
3
votes
1answer
42 views

How do I redirect /search/ to /?s=

I have a typical Wordpress site, with a typical Search page set up which uses the typical GET format <form id="searchform" action="http://example.com" method="get"> <input id="s" ...
0
votes
0answers
10 views

Redirect old domain to new domain masking [duplicate]

HOW To Redirect www.OLDDOMAIN.com to www.NEWDOMAIN.com with masking.
3
votes
1answer
51 views

.htaccess wreaking havoc on site root! Help!

I was taught that it is a good practice to separate publicly viewed webpages from included files and other, more sensitive information. That poses a problem, however, when you wish to request index....
5
votes
2answers
84 views

Is a masked 307 redirect for a domain possible?

I've been asked to create a 307 redirect for a domain, ensuring it is "masked". i.e. keep the original URL in the address bar. There isn't a lot of info available about 307 (as opposed to 301/302) ...
2
votes
2answers
90 views

301 redirection from thousands pages to single

I have a tech blog (CCTLD) running from 9 years with thousands of pages (including tags and categories) and i no longer want to continue that blog. And want to get benefit of its SEO value. Now i ...
3
votes
1answer
34 views

htaccess rewrite incoming links to new one

I'm having a problem with site migration and old links. Now, its not just a server migration, it was also a CMS migration. Site went from umbraco (asp.net) to wordpress. Problem is that google indexed ...
2
votes
2answers
114 views

How to Secure Wordpress website using .htaccess , allowing only index.php execution access

I am responsible for security of lots of shared hosting server. We have at least 500 wordpress website in each server. Some of the website owners keep a weak password for WP admin or use vulnerable ...
4
votes
1answer
75 views

How do you block a referer but for a specific URL using .htaccess?

I would like to block a referral URL from a specific domain using .htaccess. The link itself must still function on its own, it is only when the incoming referrer matches. My Site Link: www.example....
6
votes
6answers
1k 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
142 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
66 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
102 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
29 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
70 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
63 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
51 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
81 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
94 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
70 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
121 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
42 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
150 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
256 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
101 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
66 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
11 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
153 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
53 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
109 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
112 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
25 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
126 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
90 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
56 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
34 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
209 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
91 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
64 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 ...