Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
2answers
62 views

SEO: Is forcing a request to WWW.domain.com from domain.com a bad idea?

I have an htaccess file that is forcing the URL request to www. instead of a bare hostname (this is to resolve SSL issues I'm facing that are fixed when you visit the site via www.) Is this a bad ...
1
vote
1answer
143 views

Apache redirecting: reason unknown

I have a simple php script. The script is not important. It just prints out $_SERVER. When I request an URL like www.server.com/?ref=bar everything is fine. However if the request contains something ...
0
votes
1answer
328 views

Adding 1 subdomain using .htaccess

Alright, so unlike other solutions I only want one subdomain to appear to be added. Say I wanted example.com/folder/page.php to be displayed as foo.example.com/folder/page.php, how would I go about ...
0
votes
1answer
140 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/ ...
2
votes
1answer
92 views

Issue with permanent redirect implementation

I have a tricky problem related to 301 redirections I badly need help with. I tried to implement these via .htaccess, but ran into trouble. The start of my .htaccess looks like this: SetEnv PHP_VER ...
0
votes
1answer
40 views

Why don't I have a loop error with these redirects?

I know this may seem a bit of a question in reverse, but I actually don't seem to have a problem I just want to make sure before I proceed. I have 2 domains domain1.com and domain2.com and a ...
1
vote
1answer
95 views

Site overthrown by Turkish hackers

Go ahead, laugh. I forgot to remove the default admin/admin account on my blog. SOmebody got in and has replaced my homepage with some internet graffiti. I've used .htaccess to replace the page with a ...
3
votes
1answer
126 views

JS and CSS caching issue: possibly .htaccess related

I've been using the HTML5 Boilerplate for some web projects for a while now and have noticed the following issue cropping up on some sites. My CSS and JS files, when loaded by the browser, are being ...
0
votes
2answers
587 views

clean urls using .htaccess

I am trying to implement clean urls using .htaccess. Basically after searching for some time I found out this code RewriteRule latestnews/([a-zA-Z0-9]+)/$ ...
1
vote
1answer
1k views

URL Rewrite to subdomains?

say i have a website with /article.php?id=1&category=Minecraft&Name=Lorem+Ipsum and /topic.php?category=Minecraft how would i setup url rewrite to make the topic pages being ...
1
vote
2answers
140 views

htaccess rewrite problem

Maybe is best way to show my problem in one example. In my .htaccess : RewriteRule ^catalog/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/ ...
1
vote
1answer
96 views

I need a little help with .htaccess rewrite

I need a little help with .htaccess file I have songs, singers and albums links I want to rewrite. I all ready rewrote the links and they are like this: the links for the songs is like this: ...
0
votes
1answer
67 views

help with htaccess code for navigation [duplicate]

Possible Duplicate: I need a little help with .htaccess rewrite Hello, I need a little help with .htaccess file. I have songs, singers and albums links I want to rewrite. I already rewrote ...
6
votes
3answers
3k views

Where do I create the file .htaccess, in order to serve my HTML5 cache manifest file correctly?

From a post on http://diveintohtml5.org/offline.html (Wayback Machine Copy) Your cache manifest file can be located anywhere on your web server, but it must be served with the content type ...
2
votes
2answers
912 views

Redirect all traffic to construction page except my IP in .htaccess

The title pretty much says it all. I want to direct all traffic to an under construction page except for traffic originating from my IP address so I can move a large development site into production ...
0
votes
1answer
212 views

htaccess 301 Redirect with URI

How can I write a .htaccess mod_rewrite rule to redirect all traffic to a specific subfolder to a different subdomain, but include all the trailing URI and url structure and in a SEO friendly way. ...
0
votes
1answer
398 views

.htaccess mod_rewrite domain to subdomain

I need to redirect any domain to a sub-domain. I know this has got to be possible but for the life of me i can not figure it out. Any help is appreciated. For example: domain1.com domain2.com ...
1
vote
2answers
217 views

Mod rewrite rule question/help

I have the following ruleset in my .htaccess file which basically rewrites my php pages and makes them appear as subfolders, so for example, http://www.mysite.co.uk/about-me/ points to ...
1
vote
2answers
333 views

Redirecting bad links to the correct links via htacess or 301 redirect plugin for WordPress

I'm getting a lot of 404 errors b/c I recently switched content management systems (Habari to WordPress). I would like to use the 301 redirect plugin for WordPress to capture and helpfully redirect ...
0
votes
2answers
57 views

Tell search engines about a mass htaccess rename

I used htaccess to redirect my a.php?x=aaa&y=bbb to /subdir/aaa-bbb.htm. However, after fixing some errors I needed to change that rule to redirect a.php?x=aaa&y=bbb to ...
1
vote
1answer
358 views

Apache rewrite returns error 500

I'm trying to figure out what I'm doing wrong with this .htaccess rewrite: Options -Indexes RewriteEngine on RewriteBase /test/site/ RewriteOptions MaxRedirects=10 RewriteCond ...
0
votes
1answer
3k views

“Rule caching” in .htaccess - How to force apache to re-read a modified .htaccess?

I am reorganizing the link structure of a dynamic php-based site of mine. What I am trying to obtain is: redirect old links onto new ones; create new RewriteRules for new links, since every 'link' ...
1
vote
2answers
82 views

Is there something wrong with my .htaccess or is there something wrong server-side?

I'm using the following .htaccess file in one of my subdirectories on my server: Options +FollowSymlinks RewriteEngine on RewriteRule (.*)\.png generate.php?userid=$1 My non-production environment ...
2
votes
1answer
120 views

Effective combatting of 100's of spam links in Google Results

I have recently been the victim of this hacking exploit (blog post is for reference only and is not my site. I'm in the process of following it and cleaning up after the attack). Note the exploit at ...
2
votes
1answer
746 views

.htaccess mobile redirect issues

I'm trying to set up a mobile redirect for a site with 2 subfolders, and I cannot get both to work at the same time. This is the structure of the site www.mysite.com/EN/ www.mysite.com/ES/ This is ...
2
votes
3answers
732 views

Subdomains vs folders, for multi account/users application

So, for a multi user web app, what is better: http://username.domain.com Or http://domain.com/username I would like to get feedback about security, scalability and maintenance specifically, app ...
0
votes
1answer
74 views

Trouble with .htacess redirection

I use this redirect rule to redirect users from www.domain.com/admin to www.domain.com/wp-admin on a WordPress site. RedirectMatch 301 \@admin http://www.domain.com/wp-admin The problem is that ...
4
votes
2answers
323 views

.htaccess URL rewrite [closed]

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 ...
0
votes
1answer
169 views

mod rewrite help needed to redirect old domain to new domain

I recently switched sites from janeullah.com (which had an A dns entry pointing to janeullah.zenfolio.com) to janeullahphotography.com. I'm on Dreamhost, currently have A record on janeullah.com going ...
2
votes
2answers
2k views

Use .htaccess to rewrite requests for a PNG as a PHP GET variable

I'm REALLY bad with .htaccess files, and reading through the existing questions on SO only confuse me more (mainly because they're all situation-specific and don't exactly apply to my situation at ...
2
votes
1answer
16k views

Apache: Virtual Host and .htacess for URL Rewriting not working

I have configured a virtual host in my local machine and every thing is working fine. Now I want to use SEO friendly urls. To achieve this I have used the .htaccess file. My virtual host ...
3
votes
1answer
357 views

Block images on Russian domain .ru via htaccess?

I have a WordPress website which accepts anonymous comments and images. We are receiving spam in the form of Russian porn, with images hotlinked from websites on the Russian domain .ru As we are ...
2
votes
1answer
326 views

What to set for AllowOverride & Options

What is normally used as settings for both production or development servers for settings AllowOverride & Options? I will be needing to use .htaccess for WordPress so things like mod_rewrite etc
0
votes
1answer
180 views

htaccess cookie results in inf-loop, how should i do this?

I have a cookie on my site and would like to have this cookie in the url (*always), something like this: www.domain.com/?lang=en OR www.domain.com/subscribe/?lang=en *(i'm not sure if i would ...
0
votes
2answers
106 views

Disable serving specific files from web directory based on hostname used

I have very specific problem and I don't even know if I am asking at right place and if it is even possible. I have two domains, lets say domain1.com and domain2.com. Both domains share same root ...
2
votes
1answer
450 views

Duplicate content for sub domains i.e. example.com/subdomain/index.php seen the same as example.com/subdomain/ [duplicate]

Possible Duplicate: What is duplicate content and how can I avoid being penalized for it on my site? I have a website with some sub domain folders and seomoz is picking them up as both ...
2
votes
2answers
7k views

Redirect/Rewrite Subdomain to Subfolder

I'm trying to redirect a subdomain to a subfolder e.g. forums.domain.com to www.domain.com/forums Note that I started the forums in the subfolder format but worried that members might mistakenly try ...
2
votes
2answers
63 views

I want to redirect anyHOST.anyTLD to www.anyHOST.anyTLD

I'm trying to find a generic enough modrewrite rule that will acomplish following: Redirect anyHost.anyTld to www.anyHost.anyTld Not mess with any other subdomains, for examle other.anyHost.anyTLD ...
1
vote
4answers
1k views

Why is Joomla based website that was copied off of live server into localhost not showing pictures and throwing 404 error?

I have copied Joomla based website via FTP onto my machine and I am trying to make it run on my localhost which is provided by the latest version of XAMPP. I have exported and imported the DB with no ...
1
vote
1answer
506 views

302 redirect but leave the url intact

Am I able to issue a 302 redirect but leave the URL intact? I want to track accesses to a URL in Google Analytics but just display my home page. I am doing this on the assumption that Google ...
1
vote
3answers
1k views

apache rewrite .htaccess google adwords gclid

I've got an url coming in as: /index.php?/location/&gclid=287ejek22kj This is going to a 404 page because of the gclid... I need it to go to: /index.php?/location I've tried this, with no ...
2
votes
1answer
337 views

Merging two sites into one, how to redirect from the domain that's going away?

I haven't been able to find any existing questions that cover my exact issue, so here goes: My client wants her two sites (domain1.com and domain2.com) rolled into a single, new site under ...
1
vote
1answer
355 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 ...
0
votes
1answer
471 views

Help with URL and HTACCESS

I have a social engine 3 website, in my website all URLS can be changed(URL-REWRITING) through the SE-url settings automatically, but in my website their is one module which is custom coded, where I ...
0
votes
2answers
315 views

htaccess file isn't working, but did work before

I just moved from a dedicated server to a shared server to save money, but now my htaccess file doesn't work. I think its 1and1, but I'm not 100% sure. What the heck is wrong? Any ideas? The single ...
1
vote
1answer
4k views

SEO: Full Redirect from Subdomain to Root Domain

I recently setup a staging site on our server's subdomain. Somehow Google managed to crawl the pages. Now we are ready to transfer the files to the main domain and delete the files on the subdomain. ...
2
votes
4answers
4k views

How to verify what modules are active on my server?

While trying to solve a problem on my website, a recommendation about my .htaccess file I got was First of all, please check on the server for all the different modules if they are enabled, ...
1
vote
1answer
759 views

What can cause RewriteRule to work only for certain pages?

Is there any extern factor (that is, not in the .htaccess file) that can cause the RewriteRule not to work for specific URLs (of existing pages)? I have the following code in the .htaccess (it ...
3
votes
2answers
432 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, ...
2
votes
1answer
145 views

Apache mod_rewrite problem

I try to use Apache mod_rewrite to redirect some pages on my customer's website to the homepage. The .htaccess file is the following: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...