Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
121 views

Switch to https

I'm looking to use an .htaccess file to use mod_rewrite to switch the protocol from http:// to https:// when someone hits my website. For instance, once someone goes to: http://www.mywebsite.com/ ...
0
votes
0answers
13 views

Remove index.php from URL and still be able to POST [duplicate]

I am redirecting requests to index.php with .htaccess as follows: RewriteCond %{REQUEST_URI} index\.php RewriteRule ^(.*)index\.php$ /$1 [R=301,L] It works fine but the problem is forms are not ...
0
votes
7answers
2k views

Blocking all countries except US/Canada/UK

I have a site which is only for US/Canada/UK visitors. I don't want to make it visible to other visitors. I tried to put IP ranges in .htaccess (Deny IP) but it does not work for me. May be I have ...
3
votes
3answers
282 views

.htaccess URL rewrite

I used to have a rewrite rule to RewriteRule ^([^/]+)\.htm$ index.php?c=$1 [NC] RewriteRule ^([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC] Now, I have to change to RewriteRule ...
1
vote
1answer
234 views

Infinite redirect loop in cpanel-purchased script

I am installing a script (that I bought on cpanel) in the root directory of my web site. When I try to install it, it gives me an error. I found that it starts an infinite URL redirect loop containing ...
2
votes
2answers
253 views

htaccess preventing sqlite database being downloaded

I have a VPS, running apache2 on Debian 6. Created a file called .htaccess on the web root, which included: <Files ~ "\.db$"> Order allow,deny Deny from all </Files> ...
1
vote
2answers
92 views

How do I forward/redirect a website from a folder in a subdomain to another server?

I have a client with a site at subdomain.example.com/folder I've cloned it locally in MAMP. Once I've made some changes, I need to host it at an alternative physical server. (I intend to use a ...
2
votes
2answers
171 views

Send 404 Status Code on www.example.com

Does anyone know if it's at all possible (preferably with .htaccess), to send a 404 error code and page when visiting http://www.example.com but have http://example.com working just fine? I want to ...
0
votes
4answers
119 views

Redirect everything from old domain to new domain

I need to (permanent) redirect all of the following: www.domain.com www.domain.com/folder sub.domain.com sub.domain.com/folder Basically all URLS that are reachable without being intended to: ...
0
votes
2answers
107 views

Redirect pages to fix crawl errors

Google is giving me a crawl error for pages that I have removed like www.mysite.com/mypage.html. I want to redirect this pages to the new page www.mysite.com/mysite/mypage. I tried to do that by ...
1
vote
0answers
53 views

.htaccess file size causes 500 Internal Server Error

As soon as my .htaccess goes over approx 8410 bytes, I get a 500 Internal Server Error. I don't think this is due to a bad redirect, as I have experimented with redirects in the .htaccess and then ...
1
vote
1answer
153 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 ...
1
vote
1answer
40 views

SEO penalization after 301 redirect

A client asked to re-do his website entirely. After I finished, I uploaded the new website into a folder of the old one, so the new one is in www.oldwebsite.com/new/. The old has few pages, static ...
1
vote
2answers
171 views

WordPress .htaccess preventing subfolder access

This is sort of a goofy setup, but it's not in my power to reconfigure it at this time. I'm running in a shared hosting environment. The domain is example.com. This is an add-on domain on the host ...
1
vote
1answer
42 views

Website starts showing 404 after 301 redirects via .htaccess

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 ...
2
votes
1answer
189 views

Is my .htaccess settings hurting SEO?

I have a site that I have redirecting to HTTPS. I do this to leverage wildcard SSL for my password protected pages. Everything seems to work fine with testing. For example, whether you type in HTTP or ...
2
votes
1answer
74 views

Rewrite catalog/index.php to www.domain.co.uk

We have an online shop with a welcome page. Our SEO company has asked us to get rid of the welcome page with a rewrite. I am struggling to get this to work. Can you help please? I want to rewrite ...
2
votes
1answer
588 views

sub folder non-www redirect

Is there a way to redirect a sub folder to no-www? What I use is: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] but this only ...
0
votes
1answer
61 views

Getting the masked URL values in Mediawiki

I have successfully masked the URL in Mediawiki. By using the following scripts in .htaccess and localsettings.php files in Mediawiki, i.e.: .htaccess: Options +FollowSymLinks RewriteEngine on ...
2
votes
2answers
121 views

Clean URLs issue using .htaccess in PHP project

I am working on a PHP laravel project. I am currently facing issues with .htaccess file. I have following .htaccess: <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / ...
2
votes
1answer
118 views

how to fix .htaccess - redirect http://408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111

We want to use mod_rewrite and .htaccess to do a redirect. How do we redirect http://408.111.1111.domain.us/ and www.408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111 ? If the ...
0
votes
1answer
88 views

Prevent htaccess 301 redirects on sub-domain

I have 301 redirects which direct /index.html to /site folder and when i created a sub-domain it also redirects the link to /site which causes 404 Not Found For example: members.mysite.com redirects ...
1
vote
2answers
32 views

Redirect incomplete URL to index page

I want to redirect specific URLs to the index page not to 404 error page (ex: http://www.website.com/trip-15). If I remove any character from the URL it will go to 404 error page (ex: ...
1
vote
1answer
55 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
296 views

URL redirection to same domain on different server

We have existing domain on non-IIS server and now we have moved it to IIS server. Client want us to redirect the URL from existing server to new server with same domain name. We will modify the ...
0
votes
1answer
35 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 ...
0
votes
1answer
33 views

Why would my new WordPress site require a 301 redirect?

I just finished moving a site from localhost to its final domain, and the thing is that the SEO guys is saying I need to make a "301 redirect" from the old site to the new one, but there is no such ...
0
votes
0answers
23 views

Redirect index.html to root for Apache using .htaccess [closed]

I am new to configuring a .htaccess file. Please tell me how to redirect http://website.com/index.html to http://website.com/ using a .htaccess file.
0
votes
0answers
22 views

GoDaddy: “No input file selected” and .htaccess with mod_rewrite?

This is a GoDaddy hosting problem I believe but I have no choice but to stay with them because of my clients. I have recently installed Open Classifieds 2 and was told during installion mod_rewrite ...
2
votes
1answer
139 views

How to set htaccess working on opensuse for codeigniter project

I'm trying to have htaccess work on codeigniter project but the module is not working and I don't know how to enable rewrite module. To have read the htaccess. The OS is Opensuse 12.2. I have this ...
0
votes
1answer
51 views

show 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
2answers
25 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 ...
4
votes
2answers
957 views

How to 301 redirect from old query string urls to CakePHP Canonical urls?

I currently have a .htaccess file that looks like this: RewriteCond %{QUERY_STRING} ^action=view&item=([0-9]+)$ RewriteRule ^index\.php$ /index.php?url=item/%1 [R=301] RewriteCond ...
0
votes
2answers
266 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/ ...
1
vote
0answers
33 views

How can I mask sub-directory to work as DocumentRoot for multiple domains pointing to the same location?

I am trying to mask sub directories to effectively work as DocumentRoot for multiple domains. e.g. I have two domains - domain1.com & domain2.com both pointing to the same location. I want ...
0
votes
3answers
131 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 ...
4
votes
2answers
605 views

Redirecting subdomain to root index.php

I am new to this. Here is the situation and I'm wondering if someone can suggest the best solution to it: I have a domain "www.mydomain.com" where I have a Magento website running, we are in ...
0
votes
1answer
111 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 ...
1
vote
2answers
232 views

.htaccess remove index.php/url/ from URL

.htaccess is not working. /index.php/user -- is working http://www.example.com/user is not working Current .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
188 views

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

Recently I've started learning Laravel , I haven't any 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
1answer
20 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
298 views

“File does not exist” in apache error log when mod_rewrite is using

I am getting below error in server log, when re-writing the urls. [Fri Jan 25 11:32:57 2013] [error] [client ***IP***] File does not exist: ...
3
votes
1answer
392 views

Password protect an alias virtual directory

I have a main domain being hosted through CPanel. I also have a sub-domain that I would like to appear as a path under the main domain instead of as a sub-domain. So I have: http://example.com/ ...
1
vote
2answers
511 views

URL rewrite subfolder to root and forbid accessing subfolder

I have Drupal installed in a subfolder drupal but I want to access pages as it is in root folder: http://www.example.com instead of http://www.example.com/drupal I'm able to have this working, but ...
4
votes
2answers
560 views

302 Redirect causes garbage at end of Wordpress link in Facebook

When I try to link my Wordpress blog to Facebook, the url doesn't resolve properly. There's garbage appended at the end and Facebook is not able to retrieve information from the site. Happens in ...
0
votes
2answers
31 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
97 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
156 views

edited and reversed changes on .htaccess - site starts redirecting to .comindex.php/

Site is a Joomla 2.5 site. I wanted to add a non www to www redirect to the htaccess file, did so, then the redirection went mad, reversed but still the site redirects. When i click view site in ...
0
votes
1answer
48 views

Turning openbase_dir off using .htaccess

Im 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 dont have access ...
3
votes
2answers
407 views

RewriteRule not working for certain URLs

There are a few domains pointing towards the same server, and of course I need them all redirect to only one of them. Redirects work, but only for certain URLs. What works: http://www.domain.com, ...

1 2 3 4 5 10