Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
459 views

RedirectMatch in .htaccess not working

I am using Transposh plugin to make my site 'bilingual'. Unfortunately, despite having English as the default language and therefore available at carolineelisa.com/xxx, Google is indexing ...
0
votes
1answer
1k views

.htaccess non-www to www rule seems to work but the URL isn't changing in the address bar

On a joomla site, apache, shared hosting, I'm using next .htaccess rule: RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] The problem is that the browser's ...
1
vote
1answer
361 views

Limited 301 Redirect performance in .htaccess?

I'm in a situation and haven't been able to find a proper solution after much research. I'm working with a client who just built a new website with a different URL structure. After the website was ...
2
votes
1answer
5k views

Help with 301 redirect from subdomain to root domain

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work. ...
1
vote
0answers
407 views

404 error on a file/directory that exists?

We are using the vBulletin system. I have set it up so that it redirects 404 error's to a php page, so it follows the theme of the forum. However, if I go to a directory that exists (the admin ...
0
votes
1answer
81 views

rewrite url for articles with htaccess

I've had a look through several other questions to see if i could get this working but have had no success at all at the moment so i'm hoping someone can help. This is the url i currently have, ...
1
vote
1answer
426 views

.htaccess Forward all mail subdomains to /webmail/

I would like to write a .htaccess rewrite command that takes any url with a subdomain mail and forwards them to whatever domain included that subdomain with /webmail at the end. e.g. mail.zane.com ...
0
votes
1answer
377 views

How to silently auto-load from a subdirectory, but allow internal paths to think the file is located at site root?

I have files in my site root, and also files in its "Iternet_IE" directory. I need to: 1.) be able to call/include other files (e.g. headers or footers) from within files at either of those ...
1
vote
1answer
392 views

conditional DirectoryIndex based on IP address, using .htaccess

I've got this in httpd.conf: <VirtualHost xx.xxx.xx.xxx> Options All +ExecCGI ServerAdmin hostmaster@thehost.com DocumentRoot /var/www/html/domain.com ServerName dl.domain.org ...
2
votes
2answers
4k views

How can I fix the #c3284d# malvertising hack on my website?

For the past couple of weeks at semi regular intervals, this website has had the #c3284d# malware code inserted into some of its .php files. Also the .htaccess file had its equivelant code inserted. I ...
1
vote
2answers
5k views

Best practice for adding the www subdomain: Via an A record or htaccess redirect?

Having used both methods in the past I just wandered which method is actually best practice when handling the www subdomain? Do I setup another A record in the DNS to point to the same IP ad the root ...
-1
votes
1answer
158 views

htaccess Rewrite Syntax?

I have a bunch of files with a "NEW-" prefix (e.g. "NEW-index.php"). I need to do a 301 redirect to the corresponding file without the prefix. I've tried a few things but I'm not getting the regex ...
1
vote
1answer
220 views

if i change the cname of my site to point to tumblr will any .htaccess file i upload to the root be over ridden?

If i upload a .htaccess file to the root of my domain but then point the domains cname at tumblr will the contents of the .htaccess file be over ridden by tumblrs htacess file ?
1
vote
1answer
312 views

Prevent .htaccess 301 redirects on subdomain

I have 301 redirects which direct /index.html to /site folder and when I created a subdomain it also redirects the link to /site which causes 404 Not Found. For example: members.mysite.com redirects ...
1
vote
0answers
595 views

File access forbidden in htpasswd [closed]

I have been using the htpasswd generated in this question and it seemed to have been working well until recently. Since yesterday, I am not able to access the newest file created in the folder ...
2
votes
2answers
154 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 ...
1
vote
2answers
469 views

How to Do htaccess 301 Redirect from Old Filename Pattern to New Filename Pattern?

I have a bunch of old files prefixed with "old-" (e.g. "old-abcde.php"). I need an htaccess rule to set up a 301 redirect so that any request for a file starting with "old-" goes to its corresponding ...
0
votes
1answer
1k views

Link to pages on site without .html extension appearing in browser?

I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example: www.mysite.com/document directs to www.mysite.com/document.html ...
3
votes
2answers
5k views

Removing .html and index.html from URL

I'm having some problems trying to Remove the .html extension from URLs Removing 'index.html' from an URL 1) To remove the extension I have tried using this in my htaccess file. RewriteEngine on ...
2
votes
2answers
474 views

Help with URL Rewrite

I have a page that selects some info from a database and displays it with a link to a second page that uses the result to query the database, something like this: $sel=mysql_query("select id, title ...
2
votes
2answers
1k views

getting 500 intenal error when setting 301 redirect using .htaccess

I am trying to use a 301 redirect to direct users and bots to my new site but when I put the .htaccess live i keep getting a 500 internal error shown. The site is actually a subdomain which i want ...
0
votes
2answers
811 views

Redirecting IP address to domain address

Google has indexed the IP address of my site rather than the domain, so now I'm trying to set up a 301 redirect that will redirect the IP address and all subsequent pages to the domain. I currently ...
0
votes
3answers
206 views

Subdomain Is Redirected and Causing an Error Because www. is Added

On my site, say example.com, if I try to access test.example.com, Firefox automatically adds www. to test.example.com, making it www.test.example.com, which causes an error. However, if I visit a site ...
0
votes
1answer
117 views

Will rewriting your .htaccess to 404 to return search results from your site negatively effect your ranking in Google?

Depending on the type of site that you are running, it may or may not be advantageous to display search results instead of a 404 page, when someone visits a non-existent page on your site. I believe ...
4
votes
1answer
325 views

.htaccess and gzip compression

i have question about GZIP compression, actualy my wordpress website doesn't have .htaccess to be able to use that feature, so can i create .htaccess file only for gzip, it won't change anything on ...
1
vote
2answers
5k views

Exclude a sub directory in a protected directory

I need to exclude protection on one of the folder inside a protected directory with .htaccess I put .htaccess in here: /home/mysite/public_html/new/administrator/.htaccess The directory need to ...
0
votes
2answers
594 views

PHP URL Shortening/Re-Writing

I'm looking to shorten some links, by re-directing. I'm wondering what the best way to do this is: I have files at www.mysite.com/qr/quicklinks/User/ but I'm wondering if it's possible to somehow make ...
0
votes
2answers
252 views

Redirecting requests for .html pages in subdirectories to the same page in root with .htaccess

I am porting a site from an old version of a CMS to a newer version which has different page addressing techniques. I'm unfortunately not very good with htaccess at all. ...
0
votes
2answers
679 views

When using Mod_rewrite does google bot see the original url or the rewritten url?

If i use the bellow code in my .htacess file would google bot (or any other search spiders) see the example.tumblr.com url or would they see the same url as the user ie. example.co.uk/blog ? ...
1
vote
1answer
277 views

Need to sanity-check my .htaccess, especially Limit GET POST line for Google repellent

I need a sanity check on this .htaccess (from a WordPress site) I inherited from a 5 month+ old site. What's the symptom? Google + Bing crawl, but don't index any of the pages. Let me be clear: I'm ...
2
votes
1answer
343 views

.htaccess rewrite , parked domain on another site to read the proper domain name

I have a parked domain example.co.uk on another domain name web-space in a folder and need to rewrite the domain name in the browser URL as it currently shows the other domain name while browsing and ...
1
vote
1answer
525 views

Block access to robots.txt file .htaccess

I read in this forum that this .htaccess code should block access to the robot.txt file: RewriteCond %{HTTP_USER_AGENT} ^Mozilla RewriteCond %{HTTP_USER_AGENT} !(Slurp|surfsafely) RewriteRule ...
4
votes
4answers
1k views

htaccess 301 redirect help needed(removing GET parameters)

Due to some issues in my site many pages are visible as duplicate using : www.example.com/page.html?task=view but it's content is exactly same as www.example.com/page.html. One way is to use http 301 ...
3
votes
1answer
518 views

Proper caching method with .htaccess [duplicate]

Possible Duplicate: .htaccess and browser caching There are a lot of snippets that enable caching on a website and I don't know which one should I use. The most popular is something like ...
4
votes
3answers
1k 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 ...
1
vote
1answer
135 views

Is redirecting mydomain.eu & mydomain.net to mydomain.com using .htaccess spammy?

A client has asked me to develop their site - they already own 3 domains, mydomain.eu, .net and .com. They want all the traffic from .eu and .net to redirect to .com. I've explained to them that it ...
0
votes
4answers
175 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: ...
2
votes
1answer
515 views

Tell apache to point to a subfolder as default starting point for public

What would be the different methods of telling Apache to serve up httpdocs/public instead of httpdocs as the default starting point? I want to be able to have my includes and logs directories behind ...
1
vote
1answer
873 views

possible to use an IP derived from Dynamic DNS in htaccess IP allow/deny commands?

On a website I manage, I want to use an .htaccess file to allow access to a certain administrative directory only from my home IP address, which is dynamically assigned by my ISP and therefore changes ...
4
votes
1answer
195 views

Best way to protect public facing development environments?

We're in the process of setting up individualized dev environments for our developers. All of our developers are remote and we don't have a VPN or anything to bring this in house. But here's the ...
3
votes
9answers
14k views

Need to Stop Bots from Killing my Webserver

I am having EXTREME bot problems on the some of my websites within my hosting account. The bots utilize over 98% of my CPU resources and 99% of my bandwidth for my entire hosting account. These bots ...
3
votes
3answers
23k views

How to set suhosin.post.max_vars in a htaccess file

I need to add this values to my htaccess: suhosin.request.max_vars = 8000 suhosin.post.max_vars = 8000 If I just add them like that I get an Internal Server Error Which is the right way to ...
3
votes
1answer
155 views

.htaccess Redirect Old Threads

I have moved to mybb to vanilla and want to redirect old threads to the new format, so the indexed threads on google aren't lost. The old format is showthread.php?tid=3003 Whereas the new ...
1
vote
1answer
1k views

Redirecting a subdomain to an HTTPS website

I need to redirect a subdomain on my website to a third party HTTPS website. We have our website hosted on GoDaddy and I tried their subdomain forwarding mechanism but that didn't work. That's when I ...
2
votes
1answer
287 views

mod_rewrite for directories

One of our developers who built the framework that our website uses is no longer with us and I appear to have a stack of issues across the site currently, one being URL rewriting across the site. ...
1
vote
1answer
3k views

.htaccess: allow from - using dynamic IP - defining the static portion of my IP?

I'm looking to secure my phpMyAdmin dir from being accessed from other IPs than my own, albeit dynamic IP, let's say it is 191.164.1.xxx (xxx = being dynamic numbers). Referring to the Apache ...
0
votes
1answer
506 views

How do I 301 redirect from the root folder to a sub folder while keeping the rest of the URL string intact

When I first launched my site, it I had MediaWiki in the root and a wordpress blog in a subfolder, /blog/. After a while spammers took over the MediaWiki site and I had to remove it. The problem is I ...
2
votes
2answers
440 views

301 Redirect exception vs. Script new connection to DB

I'll get right to it because this will be long. I've built a WordPress site for a client on a new domain name and 301 redirected his 3 other domains to point to it. Then, I learn that he has a ...
2
votes
1answer
402 views

zlib compression issues

I'm having some issues running zlib compression on my site .. Firstly if I enable zlib compression in .htaccess using: php_value output_handler ob_gzhandler then I receive thousands of lines of the ...
3
votes
1answer
696 views

Redirecting a .co domain to a .co.uk with masking

This is my first post here, so be gentle... A friend wanted a website and paid for one to be set up. For reasons unknown to me he ended up with hissite.co rather than hissite.co.uk, which is what ...