Directory-level configuration file found mostly on Apache web servers
3
votes
1answer
115 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
418 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
849 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
134 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]+)/ ...
0
votes
1answer
85 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
56 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
2k 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
627 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
100 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
342 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
166 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
211 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
55 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
229 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
2k 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
72 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
107 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
695 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
484 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
70 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 ...
3
votes
3answers
275 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 ...
0
votes
1answer
134 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
1k 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 ...
1
vote
1answer
10k 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
307 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
198 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
138 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
98 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
405 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
5k 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
60 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
713 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
440 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
805 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
286 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
226 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
230 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
265 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
2k 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
3answers
855 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
597 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
3answers
405 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
116 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 /
...
1
vote
3answers
92 views
mod_rewrite: rewriting http://$SOMETHING.app.example.com/ to http://www.example.com/app/$SOMETHING
I'm trying to make http://$SOMETHING.app.example.com/ transparently rewrite to http://www.example.com/app/$SOMETHING.
The config below is giving me a 404 and I'm not sure why.
ServerName ...
1
vote
1answer
6k views
.htaccess password protection generates 500 internal server error
I have created a .htpasswd file using htaccess tools of which I have uploaded to the root of my web hosting space (/public_html is my web root).
I created a .htaccess file which referenced the ...
9
votes
2answers
566 views
Homemade URL shortener redirect conflicting with 301 redirects
I have a website which was originally built using classic ASP. About a year ago it was rewritten in PHP. This caused file extensions to change and some pages were moved to new locations within the ...
1
vote
1answer
1k views
mod_rewrite with Apache -> mod_jk -> tomcat
Related to some of my earlier questions.
I now have a setup I quite like;
Apache httpd listening on port 80 accepting http and https connections.
Several Tomcat instances running on several AJP ...
3
votes
4answers
1k views
How to create .htaccess to block access to a subdirectory that hosts a separate domain
So I am pretty noob at with creating code in .htaccess, but I know it is what I need to accomplish a pretty simple task. So here is what I want to do.
I have a main domain, (me.com), and I am hosting ...
1
vote
1answer
312 views
Can I remove visible referer from link?
I use referer info to track which of my campaigns works the best. So instead of
<a href="someweb.com">someweb</a>
I have a link like
<a ...
2
votes
2answers
884 views
How can I redirect everything but the index as 410?
Our site shut down and we need to give a 410 redirect to the users. We have a small one-page replacement site set up in the same domain and a custom 410 error page. We'd like to have it so that all ...