Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
4 views

website redirecting to com.com

Just realized that my website - http://www.example.com is being re-directed to http://example.com.com. The http://example.com version is working fine though. Below is the redirect chain: http://www....
0
votes
1answer
217 views

In CakePhP what is the recommended method for having one sub-domain that's outside the CakePhP environment?

I have a CentOS VPS with LAMP installed. I set up CakePhP and I have my httpd.conf set up with 1 virtual host which points to my CakePhP directory. I have various sub-domains in my CakePhP environment,...
1
vote
1answer
694 views

Excluding Facebook Crawler From Following Htaccess Redirects?

I recently made my website https and it's previous url (http) had many Facebook likes which I would like to migrate to the new https url. The only change to the url was the https, no domain change or ...
0
votes
1answer
34 views

How to redirect and keep the previous URL with .htaccess?

I have created a subdomain and want to redirect it to a URL. But I want to keep the subdomain as the URL of the redirection. I have searched for it but none of them worked for me! Subdomain: ...
3
votes
2answers
56 views

.htaccess image localhost

So I've created simple .htaccess file as following to make my webiste more SEO: # PROTECT FILES <FilesMatch "\.(htaccess|htpasswd|ini|fla|psd|log|sh)$"> Order Allow,Deny Deny from all </...
1
vote
1answer
51 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 ...
1
vote
1answer
17 views

Redirecting all traffic to a script

I am on Centos 6.5 with Apache2 and Perl 5.23. I need to pass all traffic to the single perl script, check this request in a database, and show needed content (have both static and dynamic content). ...
8
votes
5answers
5k views

Forcing SSL and www in .htaccess

I'm looking for a way to force SSL and www. I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: ...
10
votes
1answer
42k views

Font blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin'

we are experiencing this error in Google Chrome. We thought everything was set-up correct. But maybe not? Font from origin http://skin.cdn.com has been blocked from loading by Cross-Origin ...
0
votes
0answers
24 views

.htaccess - setting up SEO friendly URLs and 301 redirects [closed]

I recently changed all my product-page.php links to SEO friendly URLs such as /product-name/ To ensure I've done this correctly, and for anyone else wanting to know how to do it, I just wanted to ...
1
vote
1answer
31 views

.htaccess redirect without changing url in users' address bar

My website redirects to /temp when visiting the root, I'd like it to appear as the root, without the /temp in the URL address bar. I have a simple .htaccess: Options +FollowSymlinks RewriteEngine On ...
2
votes
1answer
17 views

“Index of /” Pages > Created By Host ? > Block from Indexing

I have a my small static site hosted on a shared server. Following a Duplicate Title Tag warnings in GWT > HTML Improvements, and a subsequent Google site:domain search, I discovered that pages are ...
2
votes
1answer
476 views

Apache htaccess - modify query string with mod_rewrite

I've recently changed scripting on my website, and this has resulted in a few 404 errors as some very old queries are no longer being redirected correctly. I've been trying to create a rewrite rule ...
1
vote
2answers
46 views

Block rank-checker.online

This is really messing with my Analytics. I've previously blocked Semalt with the following code in my .htaccess SetEnvIfNoCase Via evil-spam-proxy spammer=yes SetEnvIfNoCase Referer evil-spam-domain....
0
votes
1answer
14 views

How to htaccess redirect 301 from old to new site with conditions

Is it possible at the same time to redirect 301 multiple URLs/pages from old to new redirect 301 all remain old pages to new homepage redirect 301 both www/without of old homepage to new homepage ...
4
votes
2answers
74 views

The presence of a .htaccess configuration causes a 500 error (even if it is blank)

My htaccess file is giving my webpage a 500 error and I do not understand why ... this is the code: AddHandler application/x-httpd-php56 .php RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f ...
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 ...
-1
votes
1answer
77 views

How can i do multiple 302 redirects in htaccess?

I'm currently using the following to redirect only 3-4 pages to new a site # Use PHP5.4 as default RewriteEngine On RewriteRule ^news1\.html$ https://www.example.com/news1.html [R,L] RewriteRule ^...
1
vote
1answer
33 views

Why does Apache parse .htaccess if accessed through the main page and not through a VirtualHost?

I have two websites. One is hosted on /var/www (www.example.com) and the other is /var/www/test (test.example.com). The second is a VirtualHost. I wrote a .htaccess (I'm using it to mod_rewrite), put ...
0
votes
1answer
59 views

Friendly URLs with .htaccess

I'm have the following .htaccess: RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(.*) $1 [L] RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L] My ...
0
votes
1answer
43 views

How to make a WP site read only

I have a WP site that was hacked, I have an old copy that I used and the site hacked again on another server, I suspect this copy have a trojan horse in it which created new folder for phishing. What ...
-2
votes
1answer
17 views

Can I create dynamic subdomains with .htaccess?

I want to create dynamic subdomains using only a .htaccess file. For example: http://site.asd/user.php?name=jon > http://jon.site.asd/ http://site.asd/user.php?name=username > http://username....
0
votes
1answer
352 views

SIMPLEST way to set up password protection for a static site, with basic admin UI?

I have a static site. I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about ...
0
votes
1answer
40 views

Domain forwarding to new sub domain not working

I've a site www.xyz.org which I've migrated to xyz.newsite.org. It has been more than a month but Google is still showing www.xyz.org in the SERP. I've migrated another site exactly in the same way ...
3
votes
1answer
23 views

Add an exception to Joomla's .htaccess rewrite rules to allow an Owncloud subdirectory

i'm actually use Joomla in our website and i would like to add Owncloud. The .htaccess in the root let Joomla side works without trouble: RewriteEngine On RewriteCond %{REQUEST_URI} !^/Joomla3 ...
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: ...
1
vote
1answer
58 views

How can I setup a redirect using an .htaccess that would keep part of the URL path?

I would like to setup a redirect using an .htaccess file which keeps part of the URL's path in the target URL. For example: I have the domain example.com. I want example.com/social to redirect to ...
1
vote
1answer
756 views

URL rewrite issue with cakephp

I am using cakephp framework 2.2.2 I want to create personalize URL for user if user enter username=pragnesh then they can access my site like http://pragnesh.mylocalhost.com same as in blinksale....
1
vote
1answer
99 views

How can you use Apache .htaccess to specify the location of the PHP binary on shared hosting?

I'm using shared hosting, can create .htaccess and php.ini and have access to ssh. I have PHP 5.6 installed to ~/public_html/php56 and can use this path with ssh, cron and exec() but not on the web. ...
0
votes
2answers
28 views

.htaccess: DirectoryIndex and 403 forbidden

I am learning .htaccess directives. To test, I create a new .htaccess file under my Joomla website and a test.html file. Then I put DirectoryIndex test.html in the .htaccess file. However, I am ...
0
votes
1answer
71 views

Moving subdomain to a different hosting provider

Currently my subdomain is hosted within same webhotel as my main domain. I would like to change it to point another domain (website on Windows Azure). Subdomain should be accessible all the time ...
0
votes
2answers
32 views

Why my site can run without .htaccess

I build my site with Joomla and host with Linode. I was trying to understand .htaccess file. I learned some directives and added them on my htaccess.txt file but things weren't going as I expected. ...
2
votes
1answer
31 views

My users are getting 302 Found page if they don't write https in address bar, how can I prevent this?

I host a forum website in DigitalOcean's cloud servers, using Ubuntu 16.04, Apache 2.4.20, PHP 7.0.8 and MySQL 5.7.12. I tried to troubleshoot with cURL about what is the problem, these are the ...
1
vote
1answer
36 views

website marked as “may be hacked” by google

My website is marked by google as "may be hacked". Through the admin panel of google search console, I see several links that are list as "URL injections". My site is built with opencart. As you ...
0
votes
0answers
28 views

Gzip compression not working

I have enabled mod_rewrite, mod_deflate, mod_headers and mod_setenvif in Apache and not mod_gzip, mod_filter. Tried <IfModule mod_deflate.c> # Compress HTML, CSS, JavaScript, Text, XML and ...
1
vote
1answer
576 views

Why doesn't htaccess redirect domain alias to a specific url?

I have this which i can't get to work RewriteEngine On RewriteCond %{HTTP_HOST} ^domainalias.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.domainalias\.com$ RewriteRule ^(.*)$ http://www.maindomain.com/...
1
vote
1answer
585 views

Where/how to put .htaccess files?

I am trying to update/create a .htaccess file for my apache2 server so that my webpages can be accessed without file extensions (e.g. www.example.com/whatis.php can now be accessed as www.example.com/...
1
vote
2answers
32 views

Disable directory indexing for all directories using root htaccess

How to disable directory indexing for all directories using root htaccess? Using this line Options -Indexes only disable listing on directory where the htaccess put. I'm sure there's a lot of ...
2
votes
0answers
40 views

.htaccess IP whitelist is being ignored

I have the following in my .htaccess file to only allow access from a block of IP's and everyone else is being redirected: <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymlinks ...
2
votes
2answers
897 views

How to hide awstats url parameters

currently in order to access statistics on my site I access this link: www.example.com/awstats/awstats.pl?config=awstatsconffile.org all is working fine, but what I want to achieve is simply this: ...
1
vote
1answer
475 views

htaccess sitemap.xml rewrite to /sitemaps/$_SERVER[“MYVAR”]/sitemap.xml

I am trying to update htaccess to write as following: htaccess sitemap.xml rewrite to /sitemaps/$_SERVER["MYVAR"]/sitemap.xml This rewrite should only occur if sitemap.xml is requested in root (...
1
vote
1answer
25 views

Redirect loop from two domain using the same .htaccess

How our FTP was setup, the root level is Website #1. Website #2 has it's own directory folder inside that root. Both websites refer to the same .htaccess. If I do Redirect 301 /example/ http://www....
5
votes
3answers
801 views

Is there an alternative to .htaccess?

Is there an alternative to .htaccess, in case the webhoster disabled the use of .htaccess files? I can set some PHP variables and headers inside the PHP files but how can I perform actions like ...
9
votes
1answer
4k views

Alternative to .htaccess (due to bad performance)

I've been told that .htaccess should be avoided when possible, as it reduces the server performance and new servers disable it or just don't implement it any more. I don't know how true this is, but ...
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 ...
3
votes
3answers
81 views

301 redirect in .htaccess - old URL includes ?page_id=

I want to 301 redirect several URLs from an old WordPress installation within one subdirectory to a new WP installation within a different directory of the same domain. I.E.: http://www.example.de/...
2
votes
2answers
409 views

Redirects On Image Files to Counter Google Image Gallery

The recent update to the way that Google displays images appears to have resulted in a significant drop in the traffic reaching the actual pages of our website. We are considering potential solutions ...
2
votes
4answers
210 views

Access Website by domain name only (not IP address)

Let's say I have a website example.com and it points to 12.23.42.31. Now I want that nobody can access my website by the IP address (12.23.42.31). What is the procedure to achieve this? LAMP server ...
1
vote
1answer
54 views

How to redirect 301 within subdomain?

I have 2 campaigns at competition.example.com/option_1 competition.example.com/option_2 option_1 and optino_2 are in separate folders which are in root folder. Each file and root has its own ....
2
votes
1answer
198 views

How to redirect HTTPS to HTTP behind proxy (CloudFlare)

I want to redirect HTTPs to HTTP, I tried following code in .htaccess file Options +FollowSymlinks RewriteEngine on RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=...