A .htaccess file is used to make configuration changes within a directory.

learn more… | top users | synonyms

2
votes
1answer
31 views

Url mapping from custom CMS to Drupal

We migrated a site from custom CMS to Drupal. The content has been migrated successfully, but there is a problem with URL mapping. In old site the URLs were like ...
0
votes
0answers
16 views

Redirect users based on browser language with .htaccess

Let's say my drupal website is located at http://sub.domain.com/subfolder/subfolder2/ and I want to redirect the users to the right language prefix based on their browser language. So if the user's ...
-3
votes
1answer
35 views

What advantages / disadvantages is there adding a 'www' prefix to your domain name? [closed]

currently i am replicating my site and my .htaccess file has www redirection prefix enabled, but if im copying this to my local, it will prefix my site with www.localhost. I was wondering would it be ...
0
votes
1answer
58 views

Drupal 7 Clean URLs and Image Upload

I am currently having problems with uploading images and using clean urls on my website. File permissions are working correctly. When I upload an image to an article page and then I click refresh to ...
0
votes
0answers
32 views

sub folder and clean urls

I have a rather unique issue, and if I missed the answer in the threads please direct me to them. I have drupal (7) installed in a sub-folder in document root as so : /var/www/drupaldev and I ...
1
vote
1answer
65 views

Clean URL/.htaccess problems with multiple subdirectories

I've inherited a large Drupal web site and now we're updating from Drupal 6 to Drupal 7. I cannot enable CleanURL for more than one subdirectory at a time! I think I've read just about every article ...
0
votes
0answers
37 views

How to write multiple rewrite rule in .htaccess for site redirection [closed]

I want to redirect all my HTTPS request to HTTP. Also want to redirect http to http://sitename.com/Contentpage. Please let me know which rule should i write as i have tried with several but it of no ...
0
votes
2answers
47 views

no www redirects to front page

I recently taken over a Drupal site to maintain and work on the design bit. I'm having an issue where if I enter a page on my site without the www prefix, I get directed to the front page. You should ...
0
votes
1answer
78 views

http to https htaccess always redirecting to home page

I have found following .htaccess code on stackoverflow.com to convert the http requests to https RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] ...
0
votes
1answer
82 views

Porting a multi-site setup to local (MAMP) server

There seems to be plenty of tutorials about setting up a local multi-site installation, however, I cannot seem to find any information about porting a live multi-site to a local environment. ...
1
vote
2answers
34 views

Drupal Website showing only some images

I was told to migrate a Drupal website, but I've never worked with it before so I'm having some difficulties here. I'm trying to run the site in localhost/myfolder. The URL generated for images is: ...
0
votes
2answers
130 views

Custom module menu path renaming/redirection

Is it possible to create path like subdomain for custom module menu? For example create url like xyz.example.com if path is example.com/xyz where xyz is custom module menu. I've already tried to use ...
1
vote
2answers
47 views

RewriteRule doesn't work

Due to request, every page (except the front page) needs to be prefixed with "training"; if the path was first /aboutus, now it needs to be /training/aboutus. I edited almost every page I needed by ...
0
votes
1answer
63 views

htaccess www redirect not working correctly?

I have this line in my htaccess file: RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC] RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301] And it works for the most part. But if you go to ...
0
votes
1answer
117 views

Redirect if URL does not match

I am using D7. I am attempting to create a redirect in my .htaccess file that will redirect the page if the path doesn't match a pattern. # only if a particular domain RewriteCond %{HTTP_HOST} ...
0
votes
0answers
19 views

Subdomains keep forwarding to www

For some reason, if my site is hosted on a subdomain like test.mydomain.com, it will get redirected to www.test.mydomain.com which makes it inaccessible. I have tried removing the www redirect from ...
0
votes
0answers
111 views

multisite (subdirectory, not subdomain) https redirect to proper page (htaccess issue)

I have a Drupal 7 multisite setup on Windows Server 2008, when the user goes to the /user page of their particular site on my multisite (example: /kitchen/user or /bedroom/user) I want it to redirect ...
-2
votes
2answers
173 views

Allow special character in URL like curly bracket?

Any idea how I can allow special characters like curly braces and equal ({}, =)? The IFBYPHONE analytics asked me to add this ...
0
votes
1answer
434 views

Unable to get Video + VideoJS to play MP4s on ANY Android device

This is a multi-part question - I'm running Drupal 7.14, w/ Video Module 7.x-2.9 and VideoJS Module 7.x-2.2, configured a Content Type to upload only MP4s, and Manage Display to use Video settings, ...
3
votes
1answer
59 views

Need to change the subdomain URL structure - D7

Need to change the subdomain URL structure from: sub1.example.com sub2.example.com To: www.example.com/sub1 www.example.com/sub2 Is there any module to do this in Drupal 7 If there is no other ...
-1
votes
1answer
93 views

redirect multiple unique domains to main domain using htaccess [closed]

As my title says, I need to redirect multiple unique domains to the main domain of my site. All of these domains (with or without the leading www.) domain1.com (with or without the www.) domain2.com ...
2
votes
1answer
38 views

How to redirect all images in the files folder to a default file?

Because we work with DTAP environments, our developers work on their own laptops. To get a good view of the live environment, we copy the PROD database and the files to our own laptop. However, this ...
2
votes
1answer
81 views

Alternative to .htaccess compression with Boost

My hosting provider doesn't support mod_deflate directives in .htaccess to provide compressed HTTP responses. I am using Drupal 7 with Boost and wish to compress HTML, CSS and JS responses. Is there ...
0
votes
0answers
49 views

Can't download files. Garbage code displays

I have Drupal website and my users can no longer download files. (docx, xlsx, etc). In firefox only, when the user clicks a link to download a file the page displays garbage code. I read elsewhere ...
0
votes
1answer
351 views

Remove language prefix from files URL

I have a drupal installation in a sub folder (demos/drupal) and it supports two languages (english -default- & arabic). I imported the drupal content from an old site. My problem is that the ...
1
vote
1answer
317 views

Rewrite URL not working

In Drupal 6 I used the following snippet of code in my .htaccess file to extract information from a non-existent URL and pass it to an existing URL in a GET form. However, it isn't rewriting the URL ...
2
votes
2answers
83 views

I deleted my .htaccess. easy way to fix this?

I'm clueless enough that I managed to delete my .htaccess file from my drupal site (after some mistaked advice from my webhost tech support). Now, I can go to the home page, but links to all internal ...
1
vote
0answers
45 views

Have all internal links in drupal leave out subdirectory where docroot resides

I've successfully followed some instructions online to get our plain url to direct to the content found in a subfolder (drupaldev) so that when you enter any url for that site even without the ...
0
votes
1answer
72 views

D7 in sub directory - Not able to log in

I have a Drupal site I need to show for portfolio reasons so I have installed it in a sub directory. I have changed the rewritebase to /subdir Initially without that change I was served the ...
0
votes
0answers
38 views

After editing .htacess for redirect some users started get the validation error on node creation page. What do I need to do?

I put the following code in my .htaccess to redirect the URL with www to the one without. # To redirect all users to access the site WITH the 'www.' prefix, # (http://www.example.com/... will ...
0
votes
0answers
59 views

How can I make foo.example.com redirect to www.example.com? [closed]

By editing .htaccess I am easily able to redirect example.com to www.example.com. I would also like to redirect random non-existent sub-domain hits like foo.example.com to www.example.com as well. In ...
0
votes
0answers
54 views

Drupal, Apache, and %{REQUEST_URI}

I have a live Drupal site with content at www.mysite.com/about. When trying do to an HTTPS to HTTP redirect with the following code: RewriteEngine On RewriteCond %{HTTPS} on RewriteCond ...
0
votes
0answers
67 views

How to configure second instance of drupal to run from subdirectory

I have drupal installed in the root folder of the webserver. There is also a custom drupal app that is now running from root/subfolder. I have configured settings.php to recognize $base_url and ...
2
votes
1answer
205 views

How does Drupal handle non Drupal sub directories?

I have a question about how Drupal handles requests made to subdirectories of the Drupal root that aren't under Drupal control. What I mean is lets say I have a Site directory as such: My main site ...
0
votes
2answers
287 views

htaccess 301 redirect everything except /admin

I have been scratching my head for almost half an hour already because of this. I don't know what I am doing wrong, might just be under my nose, but i just cant see it. Here's what I have on my ...
1
vote
1answer
91 views

Block visitors based on geographic location conditionally in .htaccess on multi-site install

I have a Drupal 6 multi-site install that runs numerous different websites for a single instance of Drupal. These web sites attract worldwide traffic which is what my client wants, with one exception. ...
0
votes
1answer
240 views

specific htaccess in some sites on multisite

i have several drupal sites running as multisite (same core + modules code), just moving to shared hosting Some sites should be kept password protected. (AuthType Basic) Is there a way to tell in ...
0
votes
1answer
2k views

What to change in .htaccess?

I am installing Drupal 7 on a subdomain example.com/exampledev2 and I am running into problems with .htaccess. Meaning when I put the files in the root for the first time I get a 500 Internal Server ...
0
votes
1answer
194 views

Redirected to the wrong URL

I have successfully logged in to my Drupal site. When I'm navigating any link, I am redirected, for example, from localhost/mysitename/admin/structure/block to localhost/admin/structure/block. ...
0
votes
2answers
114 views

Page not found appearing with home page

I have successfully deployed on test server by enabling clean url's through drupal admin. Now I have deployed to live server and getting problem. If i try to navigate my site as ...
2
votes
2answers
136 views

unwanted site name in url

I've just copied my drupal website from local to server, everything is fine except the url of the site is http://www.mydrupalsite.com/mydrupalsite.com/index.php (although there is no folder named ...
1
vote
2answers
122 views

Is there any security or operational problems if I do not have any .htaccess file in drupal root?

I realise that having the .htaccess file in the root of my installation is probably the way the program is designed to run, but I was having some difficulties accessing the site, and then fixed the ...
1
vote
1answer
974 views

Drupal install in sub folder

I am trying to install a drupal site that I built a while back. I put it in a sub folder for viewing purposes and am having trouble logging in. I got the site installed, the DB connected but when I go ...
0
votes
0answers
115 views

Random redirect when accessing /user

I created a website based on Drupal 7.14 (it was 7.12 originally) and everything works fine on my local test server. However, on the online site I get randomly redirected to the front page when I try ...
1
vote
1answer
257 views

Drupal Relative Path

I am using Drupal 7. The website I am on was configured previously. My goal is to add an external link to a page. However, i am having trouble. Every link I add to any page is read as a relative link. ...
1
vote
1answer
153 views

Do not let Drupal handle 404's on development environment

Drupal handles 404 error pages, but on localhost that can be very annoying, especially if you have missing assets (such as uploaded images). For each image, CSS and such that is not found, a drupal is ...
3
votes
2answers
692 views

Drupal Redirect User Login Page

Basically I need to redirect this page http://website/?q=user to https://website/?q=user I tried adding a redirect rule to the .htaccess file in /var/www/html/ but that didn't work. From what I ...
0
votes
1answer
330 views

Default .htaccess problem in FilesMatch

I installed Drupal 7 on a web server and can;t access the root domain. When I comment the following lines in the .htaccess file I can load the site without any problem: <FilesMatch ...
0
votes
2answers
348 views

.htaccess www. redirect in Dev Desktop

Possible stupid question but worth a punt... My local OS X setup uses Acquia Dev Desktop. I recently changed a remote site's .htaccess file to redirect all no www. URLs to their www. equivalents ...
1
vote
0answers
421 views

Restoring a Drupal 7 database breaks Clean URLs

I am using Drupal 7 and the Backup & Migrate module to restore (or import) a drupal install that works fine on a different computer. When I run the import process everything seems to work fine, ...

1 2