Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
2answers
70 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
42 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
63 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
5 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
89 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 ...
0
votes
0answers
43 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
72 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: ...
5
votes
1answer
66 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
23 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
103 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: ...
3
votes
1answer
67 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
48 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 ...
2
votes
1answer
27 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 ...
3
votes
2answers
149 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
51 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 ...
0
votes
1answer
25 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
73 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
30 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
55 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
146 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
134 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 ...
1
vote
0answers
31 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
13 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
68 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
46 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
41 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
143 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
79 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
33 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
183 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: ...
-1
votes
2answers
113 views

How to set execute-only permission for a php script in a .htaccess file?

I'm really a newbie in web-technologies, so this question may be silly. I have a php script that accesses a database, therefore it stores a database password (tell me a better way to store this ...
1
vote
1answer
37 views

How Do I Remove A Subfolder Using Htaccess?

I am trying to remove /view from example.com/businesses/view so you can go to example.com/businesses and it works correctly. Here's what's in my htaccess already: DirectoryIndex index.php RewriteBase ...
1
vote
2answers
84 views

How to deny direct access to font files used in CSS?

I have a website that displays texts with unique, copyrighted fonts. I use a CSS file with "font-face" elements (see the example below) and I store the font files in a folder called "type". I would ...
1
vote
1answer
54 views

PHP webpages in sub-directory cannot be accessed

I've got a university club website at thing.uni.ac.uk/meow/foobar which also has the domain foobar.co.uk. I don't have access to the config. I set up this website using HTML/CSS/JS alone and it's been ...
2
votes
2answers
59 views

Need .htaccess mod_rewrite for serving static content from subdomain, but forcing www otherwise

I have a website where I currently force example.com visits to www.example.com, and it has an SSL certificate, so I also force HTTP to HTTPS. My SSL certificate covers example.com and www.example.com. ...
6
votes
1answer
119 views

.htaccess rewrite url leads to missing css

I am trying to make my url from this: www.domain.com/view.php?id=15 To ths: www.domain.com/watch/15 My code in htaccess is as follows: Options -Indexes Options +FollowSymlinks ...
3
votes
1answer
71 views

After rewriting URL page not found

I want to rewrite my current URL that is http://localhost/sitename/landing-page/?from=Algeria&to=Afghanistan&submit=Submit to http://localhost/sitename/removals-from-Algeria-to-Afghanistan ...
1
vote
0answers
39 views

Problem with http to https redirect

I have the following .htaccess file (in www.example.com/folder1/folder2) RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] to map any HTTP request ...
1
vote
0answers
50 views

URL masking to subdomain redirecting to subdomain

I am trying to change the URL of a Joomla site in browser my original URL is like example.com/marketsite/abc and I want to change it to abc.example.com/marketsite/abc I am using following code ...
9
votes
3answers
998 views

Can the files robots.txt and sitemap.xml be dynamic through an .htaccess redirect?

I have a multilanguage and multidomain site. It runs through a unique CMS installation (Drupal), so I have a single root directory. So if I have a static robots.txt, there I only can show the files ...
0
votes
1answer
45 views

fail2ban logs IP address trying to access server, enough?

I have fail2ban and logwatch set up. There are IP addresses that are banned > 20 times every day for trying to brute force (I assume) access the server. I have added these IP addresses to the ...
4
votes
2answers
260 views

redirecting https to http

RewriteEngine on RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301] # WordPress Defaults RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} ...
1
vote
2answers
60 views

Why are my Google Analytics pageviews and sessions down?

I am running a WordPress site. Up until October 1, the site had a blog running at the root level of the site. On that day, I moved all the blog files into a directory so the WordPress blog would be ...
4
votes
1answer
156 views

Too many redirects due to htaccess code

TL;DR: What does the following line of code do? Does it remove trailing slashes from a URL? RewriteRule ^(.*)/$ http://%{HTTP_HOST}/$1 [R=301,L] I inherited a Drupal site with little knowledge ...
0
votes
1answer
16 views

Redirect a set of dir to single page

Suppose I have example.com and removed 5 directories.They consist a lot of URL.Because I give penalty from google search engine, I decide to create a page and redirect (permanent 301) those to my ...
0
votes
0answers
17 views

Redirection rule not working in .htacces [duplicate]

I have added the following rule to .htaccess RewriteCond %{HTTP_HOST} !^example\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://www.example.com/$1 [R=301,NC,L] I ...
4
votes
1answer
422 views

redirecting openshift rhcloud domain to custom domain for SEO purposes

Openshift application url: example.rhcloud.com Custom domain: example.com I came across this link and added the redirection rule. However, I can not access example.rhcloud.com now. My custom domain ...