Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
0answers
19 views

Trouble with 301 redirect of old naked domain to new domain

Using the .htaccess I am trying to setup a simple 301 redirect which does the following: http://exampleA.com redirects to http://exampleB.com http://www.exampleA.com redirects to http://exampleB.com ...
2
votes
1answer
37 views

How to customize youtube url to dynamic pretty url? [on hold]

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
25 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 ...
3
votes
3answers
2k views

Rewrite in Mediawiki, remove index.php, .htaccess

I've just installed Mediawiki on Apache and I want the URL should be: localhost/Main_Page/ localhost/Special:Recent_Changes ... instead of: localhost/index.php/Main_Page/ ...
2
votes
1answer
127 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 ...
2
votes
1answer
56 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 ...
2
votes
1answer
58 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
43 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
335 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
167 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
23 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
31 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
158 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
18 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
37 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
834 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
52 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
26 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
122 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
286 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_\-]+)$ ...
3
votes
2answers
57 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
44 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
39 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
297 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
311 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
690 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
508 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
248 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
51 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 ...
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: ...
3
votes
2answers
482 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 ...
4
votes
0answers
28 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
45 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
40 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
101 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 ...