Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
31 views

.htaccess Directory Redirect Problem

I want to redirect a directory to another directory but I've hit a snag. I want to redirect /directory_name to /new_directory_name so I put this in my .htaccess: RedirectMatch 301 ...
1
vote
2answers
15k views

Configure clean URLs for Laravel using a rewrite rule to index.php

Recently I've started learning Laravel , I have none experience with framework before. I'm encountering the following problem .I'm trying to configure the .htaccess file so I can have clean URLs but ...
0
votes
2answers
389 views

Pretending a file is in subdirectory with .htaccess

I have a web application, and it has a RESTful PHP backend that uses Zend framework (which does its own URL rewriting magic). The problem is, my backend's entry-page is api.php and the endpoints look ...
1
vote
1answer
4k views

How to redirect IP to domain?

My IP xxx.xxx.xxx.xx is pointing to example.com at GoDaddy but I just noticed that when I type the IP in browser, it doesn't redirect to the website, how can do this? I am sure this will happen ...
1
vote
2answers
1k views

SEO on multilanguage website URL

I'm setting up a multilanguage website and I would like to have your help to take the best decision as regard SEO. After reading this. I would like to change my URLs from this form ...
1
vote
1answer
105 views

Htaccess 301 redirect dynamic URL

I don't know a whole lot about .htaccess rules so forgive and help me ask the correct question. Currently I have a .htaccess rule like: RewriteRule ...
1
vote
2answers
227 views

How to double protect admin access in PyroCMS

I have read how to protect admin folder with .htaccess and .htpasswd file but in PyroCMS admin login (ex: example.com/admin) just only routing system (no admin folder yet). So, how can I double ...
3
votes
1answer
901 views

How to make “crawl-delay” works for all “user-agent” in robots.txt or in .htaccess?

I have this line: Crawl-delay: 50 in the robots.txt file at the root of my website. But it seems that it is not working at all. I get 400 visits from the Yandex user agent in a few minutes. I ...
1
vote
2answers
916 views

Automatic redirection from http to https with .htaccess authentication in virtual hosting

Hi I have configured Virtual host on apache with .htaccess authentication with SSL. It's working fine when I typed url https://www.example.com:9004/test.php but when I typed ...
1
vote
1answer
319 views

Google Analytics shows visits to pages redirected in .htaccess

Yesterday, I switched on a section of pages in our site that replaces a really old collection of pages. In our .htaccess file, I have rules that redirect a request for any page in the old section to ...
1
vote
2answers
2k views

How do I redirect a URL using rewrite in .htaccess that has a question mark and forward slash where page.html is the variable?

Hello and thanks to all who contribute to this seemingly mind boggling puzzle. I apologize in advance if .htaccess questions belong on server fault. So I have to move a domain to our hosting servers, ...
3
votes
1answer
170 views

URL not found after rewrite

Using this .htaccess file: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule matches/(.*)-v-(.*) matches/matchevent.php?event=$1%20v%20$2 [R=301,L] This url: ...
1
vote
0answers
85 views

Website starts showing 404 after 301 redirects via .htaccess [closed]

One of my clients websites started getting 404 messages on some pages after doing 301 redirects via .htaccess file. I don't understand why that happens, could someone tell me what went wrong? The ...
1
vote
1answer
125 views

Etags are not appearing on PHP pages

My hosting provider (goDaddy) seems to be adding eTags to my files. However I've noticed that they are not appearing on .PHP file (they are on .HTM, .CSS, .JS and images). Is this normal? From my ...
1
vote
1answer
263 views

Silent redirection not working with mod_rewrite

I'm trying to grasp apache mod_rewrite When I add this to my .htaccess it silently (url doesnt change) shows page bob.htm RewriteEngine on RewriteRule index.htm bob.htm I.e. If I type this in the ...
1
vote
2answers
253 views

Stop .htaccess automatically influencing subfolders

In my webhosting package, the primary domain points to the root of my file system and any extra domains that I add point to subfolders. The problem is, the .htaccess for the primary is influencing ...
2
votes
0answers
11 views

How to use .htaccess to make a subfolder act as a subdomain [duplicate]

I have to make a new site for every subdomain I want to add directly on my host, so I'd like to make them subfolders and redirect like this so they look like subdomains anyway. For example, how could ...
1
vote
2answers
754 views

Conditional RedirectMatch based on IP

How do I use this RedirectMatch with limiting by IP address? This is what I have right now, and it works as is: RewriteRule ^dir.*$ http://www.mysite.org/otherdir/ [R=302,L] I want this to work ...
2
votes
1answer
56 views

Force url to use www [duplicate]

I'm confused about how to force my url to use www in the address. I have a .htaccess code like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f ...
1
vote
2answers
151 views

Need to redirect all files/folders under subfolder but leave subfolder alone

I hope my title makes sense. Here is what I have: On our previous website, we had URLs similar to the following: www.example.com/support/BIOS/JXT/0ABWDA22.zip This same file on our new site has the ...
1
vote
1answer
695 views

Separate 404 page for subdirectory

I've made a subsite which runs under mydomain.com/subsite - idealy from an architecture point of view it would be under a subdomain, but we wanted the links to come back to the main domain. The sub ...
2
votes
1answer
68 views

Simple RewriteRule [duplicate]

I'm trying to write a RewriteRule to make a simple url. I want users to be able to type enter www.example.com/somepage and have it take them to www.example.com/abc/somepage.php How can this be ...
3
votes
2answers
241 views

Using .htaccess for proper indexing/SEO of timthumb images

I don't know a whole lot about the intricacies of SEO so I was wondering if someone here could provide some insight to this problem. When you use the php script timthumb on a website, it means images ...
1
vote
0answers
60 views

optimize htaccess

I have two condition which are conflict RewriteRule ^patients/findadoctor/(.*)\.html$ subcategorydoctor.php?id=$1 [L,NC] and RewriteRule ^patients/findadoctor/(.*)\.html$ ...
3
votes
2answers
285 views

Can the .htaccess file slow down a website to a crawl? If so, are there better ways to solve these problems with different rewrite rules and such?

here is my htaccess file...... RewriteCond %{REQUEST_URI} ^/patients/billing/FAQ_billing\.html$ [OR] RewriteCond %{REQUEST_URI} ^/patients/billing/getintouch\.html$ RewriteRule ...
3
votes
1answer
1k views

.htaccess and .htpasswd throwing 500 internal server error

I've created a .htaccess and a .htpasswd file, both using my hosting's tool, uploaded them, and I get an error when I try to view the directory. Why? my .htaccess file: AuthName "Restricted Area" ...
1
vote
1answer
274 views

Combine redirect to naked domain and point existing content to /blog

I think the .htaccess setup for this ought to be fairly straightforward, but I'm having a hard time with it for some reason. I've just completed the migration of a WordPress single site installation ...
1
vote
1answer
265 views

Canonical URL issue for www.takemyview.co.in

My shares and stock market analysis an advisory website has canonical URL problems. My web server is not able to resolve this issue for now using htaccess or any other means and all my SEO efforts are ...
2
votes
1answer
286 views

Redirect domains single pages and maintain url

I have several domain names that need to point to individual pages on a single host and still maintain the URL. For example: examplesite1.com needs to point at mainsite.com/examplesite1.php but ...
3
votes
1answer
1k views

Can I allow access to a HTML page only if the user comes from a specific site with .htaccess?

A website with two HTML pages, A and B. Both can be accessed by typing the URL, of course. However, can I disallow any access to page B, and only allow it if the user is coming from page A? As in, a ...
4
votes
1answer
982 views

What are the most commonly used and basic Apache htaccess redirects?

This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to ...
1
vote
1answer
410 views

Rewrite rule for 403

I have an .htaccess file: In this file it redirects to index.php in case a file or directory is not found. My code is as below: <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} ...
1
vote
1answer
142 views

.htaccess keeps being deleted from my root directory

I have a site built on the ModX Evo CMS. I have noticed that almost every day the .htaccess file is deleted meaning the FURLs no longer work. I have scanned for viruses and found nothing. Does anyone ...
0
votes
1answer
163 views

Can I redirect the HTTP request towards an old folder to the homepage using .htaccess file?

I have to following situation: I had an old blog that was made using Joomla (this blog was indexed well enough by search engines). For some problems I delete it and I have create it again using ...
1
vote
2answers
131 views

Showing index.htm and index.php both

I have a static HTML based site. Server automatically pulls the index.htm as the default page. Fine. I just installed WordPress in the root: But .com/index.php is redirecting automatically to ...
0
votes
1answer
540 views

How to fix this 404 soft error?

I have a static HTML website. www.example.com/?12345 (this page doesn't exist) redirects to www.example.com and www.example.com/page.html?12345 redirects to www.example.com/page.html. I don't know ...
0
votes
3answers
818 views

301 redirect from “/index.html” to root if index.html not exist

Can I create 301 redirect from "index.html" to root directory if file "index.html" not exist? For example: link "http://example.com/index.html" show "404 Error" page. I need 301 redirect to root ...
0
votes
2answers
69 views

How to change a URL using .htaccess

I don't know anything about coding, but I really want to change the URL of my pages: site/data/9/Symbian-3rd-Apps.html to site/symbian_applications.html ...
0
votes
1answer
1k views

.htaccess Redirect based on subdomain

I'm looking for some help in accomplishing redirects based on the subdomain. For example if some tries to access: http://1.test.com it will redirect to: /file.php?test=something and if ...
1
vote
2answers
333 views

What type of server is using Django/Python? .htaccess is compatible?

I was wondering what type of server is using python & django because i don't know if can i use an .htaccess file and if there is something similar. Thanks.
2
votes
1answer
96 views

.htaccess redirect with mod_rewrite

I moved my wiki from http://jklatex.square7.de/wiki/doku.php/start to http://logicpuzzle.square7.de/start and now i want to redirect the URL with mod_rewrite. My .htaccess is as follows: # BEGIN ...
1
vote
1answer
3k views

Turning openbase_dir off using .htaccess

I'm trying to run a script on my shared hosting account, I keep getting an error relating to open_basedir, which I understand would normally be turned off in the php.ini file, which I don't have ...
1
vote
0answers
385 views

htaccess doesnt work in subfolder

I'm using xampp with apache on my windows machine. My directory structure is: C:/xampp/htdocs ---------------/Sync --------------------/ProtectedFolderA ...
0
votes
2answers
616 views

Issue with Apache redirection [duplicate]

I want to redirect mysite.com or http://mysite.com or www.mysite.com or any other format given my user to http://www.mysite.com, I'm able to achieve this by rewriting following lines in my .htaccess ...
0
votes
1answer
143 views

Capitals in URL subdirectory not changed by htaccess

Within my WordPress website I am redirecting sub directories to internal and external links. Now, when you place a CAPITAL letter in the sub dir it does not work anymore and the website does not show ...
2
votes
2answers
50 views

Need to remove www for only one sub directory from a domain

I have a domain like www.example.com. I need to remove www. from specified sub folder by using a .htaccess file. Example : www.example.com/blog should redirect to example.com All other sub ...
4
votes
3answers
608 views

SEO Joomla URL to WordPress URL's

I am trying to migrate from Joomla 1.5 SEF URL's to WordPress SEF URL's. The old links use this formatting: /site/sectionname/categoryname/id-titlename.html I want to migrate it to ...
3
votes
2answers
304 views

prevent hotlinking of off-site content?

I have a www.example.com site where I serve all static content (e.g. http.//www.example.com/image.jpg) off a CDN with URLs like http://static.example.com/image.jpg An Apache 2 .htaccess rule ...
1
vote
1answer
67 views

Keep visitors out of server directories and redirect

The web application I use (Zenphoto) stores images in /albums and subfolders. It's backend needs r/w-access to those folders and I need r/w-access to the folders via ftp, but the frontend never looks ...
2
votes
2answers
983 views

How to prevent a specific website from linking to our domain?

We have a landing page which is used only for running an ad campaign. There is a website that has found this link somehow and is linking to it. I've been told by marketing they don't want that website ...