Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
55 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: ...
2
votes
2answers
42 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 ...
1
vote
1answer
329 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 ^(.*)$ ...
0
votes
2answers
166 views

.htaccess rewrite but keep basic URL

I have basic domain, for example, domain1.com. Also I have domain2.com which is addon domain, and I want to redirect domain2.com to domain.com?parameter=value, which is basically domain1.com, but with ...
3
votes
1answer
70 views

Getting 406 on IE after Google redirects my site

I have a WordPress blog. When I search the posts from my site in Google, the results appear and on clicking the result I can open that particular post on my site. But while doing the same on Internet ...
2
votes
1answer
21 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
24 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 ...
4
votes
1answer
149 views

Redirect and removing question mark on URL using htaccess

When I access my site using www.example.com/blog it redirects to example.com/?/blog. How can I remove the question mark, so that the redirection just goes to example.com/blog? My current .htaccess ...
3
votes
1answer
17 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 ...
1
vote
1answer
36 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 ...
1
vote
3answers
92 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 ...
0
votes
1answer
33 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
833 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: ...
3
votes
2answers
49 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 ...
2
votes
2answers
2k views

301 redirection removes UTM tags from URLs

A page redirects to another page using a 301 redirect in a .htaccess file. If try to access the page from a URL with UTM tagging after redirection, it removes all UTM tagging. Is this normal ...
1
vote
1answer
24 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 ...
0
votes
1answer
118 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 ...
1
vote
1answer
284 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 ...
0
votes
1answer
28 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 ...
3
votes
3answers
1k views

Replace %26 in htaccess to %2526

I would like htaccess to rewrite example.com/something_%26_else into example.com/something_%2526_else I'm importing a bunch of pages that have ampersands in the title from MediaWiki. These are ...
1
vote
3answers
97 views

Simplify URL rewrites in .htaccess?

RewriteRule ^([A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L] RewriteRule ^([A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1 [L] RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)$ ...
2
votes
2answers
54 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. ...
2
votes
1answer
1k views

How to redirect requests to another folder using .htaccess?

How to redirect requests to another folder using .htaccess? I have my root directory and my website looks into that directory. I want it to look in the /subdirectory/ instead. I can't modify the ...
3
votes
1answer
42 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
2answers
38 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/ ...
1
vote
2answers
295 views

htaccess rewrite doesn't work

I'm trying to redirect url's in my /joomla/ folder containing "rsform" to the same url but except for /joomla/ /formulieren/. However my tried .htaccess rewrite doesn't work. I tried: RewriteEngine ...
2
votes
1answer
307 views

HTACCESS redirect a URL with query string in it

Basically you can visit /stats.php?player=name by simply typing in https://domain.com/@name and it works perfectly. But I also need the old /stats.php?player=name links to redirect to ...
3
votes
2answers
659 views

htaccess redirect non-www to www with SSL/HTTPS

I want a rewrite rule that redirects everything to https:// AND www. For example https://example.com should be going to https://www.example.com This is what I have: RewriteEngine On RewriteCond ...
2
votes
1answer
93 views

Subdomain htaccess rules

I have the following .htaccess in my root: DirectoryIndex index.html index.php Options +Indexes # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ...
4
votes
3answers
503 views

Check for URLs that return my 404 error page

I have made a custom 404 error page called error_404.html In my .htaccess I inserted: ErrorDocument 404 /error_404.html In order to control/correct 404 errors in my website, I would like to know ...
1
vote
1answer
242 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 ...
0
votes
0answers
4 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
68 views

Leverage browser caching for WordPress images on media subdomain?

My website is built with WordPress and I'm using a combination of the plugins W3 Total Cache and Autoptimize to make my website faster. My settings seems to be correct and most optimisation efforts ...
1
vote
2answers
48 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 ...
1
vote
1answer
111 views

Efficient use of 301 for large redirect map

EDIT: As requested below, this is the entire ruleset for one product (obsolete now, as I should be able to consolidate these into ONE simple rule that looks for the productID#): RewriteRule ...
0
votes
1answer
508 views

Htaccess 404 & 301

The site runs on WordPress (latest) and is installed in /htdocs/www/. This htaccess file is in /htdocs/www/roh/ along with a bunch of images and some CSS. I want requests to the old html files to ...
2
votes
1answer
124 views

“Friendly URLs” rule in .htaccess interfering with some directories

My .htaccess is set up to remove .html from URLs as follows: RewriteEngine on RewriteCond %{http_host} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,NC] RewriteCond ...
5
votes
1answer
80 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: ...
2
votes
1answer
50 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 ...
3
votes
2answers
479 views

access-control-allow-origin not working?

I've seen similar questions asked here but I am still unable to solve this issue. I'm running Typekit and FontAwesome (from CDN) and I get the following error XMLHttpRequest cannot load ...
0
votes
0answers
36 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 ...
3
votes
0answers
27 views

301 Redirect with Reverse Proxy

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 ...
2
votes
2answers
44 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 ...
1
vote
0answers
20 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 ...
3
votes
1answer
39 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 ...
3
votes
2answers
96 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
227 views

Force https and no www using htaccess

This question has been asked a million times before but my problem is that this still doesn't work for me, regardless of what code I use so I was wondering if I could have some help perhaps? This is ...
8
votes
4answers
4k 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: ...
2
votes
1answer
19 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 ...
1
vote
3answers
45 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 ...