Directory-level configuration file found mostly on Apache web servers
2
votes
1answer
295 views
Htaccess - Rewrite png to php file
I currently use trans.png.php?id=1&campaign=test to track my newsletter campaigns.
I want to use trans.png instead as it's the src of an img tag.
How can i do this in htaccess? Also is there any ...
4
votes
1answer
2k views
How to write a generic .htaccess file rule, regarding RewriteBase
The following rule in my .htaccess works just fine for routing calls to index.php:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
However, this does not ...
1
vote
2answers
115 views
Strange links appearing in 404 logs
I've recently been going through our 404 logs and we have a number of urls which look like this turning up:-
...
1
vote
1answer
117 views
Links don't work on new server
I've recently moved from server with php4 to php5. Now I cant open content in my page. Links look like this "page.com/news-it-is-rainy-day-1.html". But when I try to open link I just get the archive ...
1
vote
1answer
173 views
Website .htaccess file for Wordpress sub folder
I developed a Flash website for a client and added the following .htaccess file in the root directory and the non-www to www redirect works perfectly.
RewriteEngine On
RewriteCond %{HTTP_HOST} ...
10
votes
2answers
2k views
Can .htaccess slow down a site?
I'm working with a client on an e-commerce website. I implemented clean URLs using .htaccess. I also used .htaccess to solve canonical issues such as redirecting www to non-www and removing index.php ...
2
votes
2answers
248 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>
...
0
votes
2answers
224 views
htaccess and htpasswd trouble
This is the first time that I have ever tried working with .htpasswd and .htaccess files, so please point out my childish works.
I have my apache document root set to /www/ on my debian server. ...
1
vote
1answer
1k views
.htaccess - lose the file .html extension
I'm having a bad .htaccess day!
I want a user to be able to type the URL
mysite.com/about
instead of
mysite.com/about.html
On .htaccess file I have:
RewriteEngine On
RewriteCond ...
3
votes
1answer
372 views
RewriteRule working local but not on remote server
I have a .htaccess file with one simple RewriteRule:
RewriteEngine on
RewriteRule ^([A-Za-z0-9-]+)$ ?site=$1
I want to have an url like http://www.example.com/imprint and forward it to ...
1
vote
2answers
76 views
Full password not required to access password protected directory?
I password protected a directory in cPanel. When I went to access the page in my browser, I accidentally hit backspace on the password before I hit enter. Surprisingly, the page still loaded. I played ...
1
vote
2answers
384 views
Having mod_rewrite not rewrite requests for a particular directory
I have many forward rules written in my .htaccess file. However, for the requests to a certain directory and its subdirectory, say wordpress, I don't want to use the forward rules.
RewriteEngine On
...
4
votes
2answers
334 views
Difference between “/” at end of URL and without “/” [duplicate]
Possible Duplicate:
Does it make a difference if your url ends in a trailing slash or not?
Why treat these as different URLs?
I am doing a 301 redirect in my WP application using ...
0
votes
3answers
846 views
Want to create dynamic subdomain in codeigniter? [closed]
In my site i want to add an functionality for user to use their username with domain.
Like in codeigniter right now i want to give the user to use their own url to login in site and do other stuff.
...
3
votes
1answer
460 views
Rewrite img and link paths with htaccess and serve the file from rewritten path?
I have a static mockup page, which I want to "customize" by switching a variable used in image-src and link-href attributes.
Paths will look like this:
<img src="/some/where/VARIABLE/img/1.jpg" ...
3
votes
1answer
576 views
Will adding “www.” to my domain setting in Google Analytics impact already collected data?
I have a profile in Google Analytics (GA) that has been collecting data for a year. The domain setting in GA is "http://example.com". The site, however, will redirect any non-www request, to ...
2
votes
1answer
352 views
GoDaddy-Drupal Site down due to mysql password change, how to change it back?
PDOException: SQLSTATE[28000] [1045] Access denied for user 'lev1127301002684'@'188.121.41.131' (using password: YES) in lock_may_be_available() (line 167 of ...
2
votes
3answers
1k views
How to restrict site access to all countries except mine with .htaccess?
I used this tool to download list in ".htaccess allow" format to allow traffic from my country and restrict all others but it's still accessible when visiting from bunch of foreign proxies.
I'm ...
4
votes
1answer
155 views
Do Dynamic Subdomains Harm SEO or not?
I am establishing a new website for just resumes, and I structured my htaccess as to provide dynamic subdomains as:
marketing.resumedomain.org/index.html
sales.resumedomain.org/index.html
...
0
votes
0answers
356 views
“Allow from all” and “Options –Indexes” is Illegal option? [closed]
I have this .htaccess configuration
allow from all
Options –Indexes
and I want is the my web clients can access my resources in that folder but they can't do a directory listing...
did i went to ...
1
vote
1answer
122 views
Which redirection needed for this in .htaccess? 301 and?
I have two cases, it is very hard for me to separate them. I see them as redirection -problem.
# 1. I want to redirect all .*/feeds to mySite.com/feeds showing
# the content of ...
0
votes
1answer
75 views
Website performance tips?
Im kind of having some troubles with the loading of my website:
Here's a link to the website: link
It sometimes loads fast, then when you refresh it.. most of the times, it will just keep trying to ...
0
votes
3answers
1k views
Restrict access to IP address range
I’m trying to restrict access to a web resource to the intranet of a company via .htaccess. Unfortunately, the approach via Allow from … isn’t working for me and and I don’t understand subnets well ...
0
votes
3answers
273 views
“Index of …” directory's files listing
On my courses we've got homework on site in folders such as:
http://example.com/files/tasks1-edc34rtgfds
http://example.com/files/tasks2-0bg454fgerg
http://example.com/files/tasks3-h1dlkjiojo8
...
...
3
votes
2answers
232 views
Create friendly looking URL's with mod rewrite
I want to make the pages on my site more search engine friendly by turning the query strings into meaningful looking page names.
For example I have a page that is this:
/search.php?c=18
I want it ...
1
vote
1answer
511 views
.htaccess issue (500 - Internal Server Error) error
I was trying to learn how to edit and make a .htaccess file using a tutorial found at corz.org, I copied an existing .htaccess file from another site on my localhost and pasted the following content ...
0
votes
2answers
462 views
Hacked .htaccess - Inconsistent Results
At present a large number of .htaccess files are being created in various website folders throughout the site. Current .htaccess files are also being modified to include the following (cleaned up) ...
0
votes
0answers
191 views
How to block domain access? [closed]
Im studing Awstats in my server and I see not interesting domain access, how can I block it with htaccess or other solution
1
vote
2answers
222 views
.htaccess is not working in lease web hosting
.htaccess is not working.
http://www.example.com/index.php/user -- is working
http://www.example.com/user --- is not working
the following file is my .htaccess file.
RewriteEngine on
RewriteCond ...
2
votes
1answer
561 views
How to redirect user into mobile website?
Hi how to redirect the user into mobile site when the user accessing from mobile. Say example i have site called www.mysite.com. Now, a person accessing a website from mobile it should redirect to ...
2
votes
1answer
336 views
Apache show file index as utf-8
I'm on a shared hosting which runs Apache on a Windows server. I am running Linux and I have uploaded some files that should be accessible directly via a public URL (that is known only by a few ...
2
votes
3answers
337 views
Displaying a “coming soon” image to users whilst I work on website redevelopment [duplicate]
Possible Duplicate:
301 redirects for all except me
I've been developing a new version of my website for a while now, on a different directory to my currently-live website.
Shortly I'll be ...
3
votes
1answer
1k views
How do I create a .htaccess file that would make my website work like adfly.
I need, but dont know how to make, an htaccess file that will send user, when looking for the home page for example, to index.php but not when look for a url like /7fg4/. Adfly, to the best of my ...
2
votes
2answers
2k views
How to manage multiple domains on same server
I have more than one (4 to be exact) domains and only one server host with same ip. How I can run all my domains from same server. All websites are wordpress sites.
1
vote
1answer
66 views
Apache2 “pseudo” doc root
I have several folders in my /www folder that contain various applications. To keep things organized, I keep them in their own folders -- this includes my base application.
Examples:
phpmyadmin = ...
2
votes
1answer
532 views
sub folder non-www redirect
Is there a way to redirect a sub folder to non-www?
What i use is:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
BUT this only ...
1
vote
2answers
2k views
htaccess 301 redirect subdirectory one level deeper - why is this not working?
it is probably a stupid question, but I have real troubles figuring out, how to redirect
/products to /products/item
It is a simple redirect, no regex needed. The toplevel site /products should just ...
4
votes
2answers
495 views
Redirecting URLs when launching a new website - how to avoid dropping page rank
i have over 100 urls in my website which i need to redirect:
E.g.
/page/how-to-bake-chocolate-cookies/ will redirect to /cookies/how-to-bake-chocolate-cookies/
/page/contact/ will redirect to ...
3
votes
3answers
557 views
How do I block US users from my website without interfering with SEO?
My website uses Apache 2.2.14 (which forwards all requests to Tomcat underneath).
I need to block all US users from accessing the website (and potentially users from other countries). But importantly ...
1
vote
1answer
179 views
WordPress redirection chaos
I have a problem regarding redirection.
It started out as I noticed, my non-www version is redirected to the www version by 302 redirect. Since then, I am trying to figure out why this is happening. ...
3
votes
1answer
203 views
Redirecting from a dynamic URL to a prettier/simple URL?
I am trying to redirect a page via my .htaccess, but it does not seem to be working.
Old page:
/dyn/?q=customer%20reference&f=1,1,1,1,1,1&c=10,10,10,10,10,10&s=1,1,1,1,1,1,1&st=1
New ...
4
votes
2answers
541 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 ...
1
vote
1answer
194 views
Apache: use `foo.html` in preference to `foo/` when both exist
How to get Apache 2.2 to use foo.html in preference to foo/ when both exist?
I'm moving a site from dynamic php to static html, while retaining the domain name. I've created a temporary mirror using ...
0
votes
1answer
191 views
htaccess - “detect” url and redirect
Idea is:
if URL = "http:/localhost/site/"
else if URL = "http:/localhost/site"
redirect to
"http:/localhost/site/index.html"
Can this be done with .htaccess / Apache mod_rewrite and how?
2
votes
3answers
2k views
.htaccess mod_rewrite 500 internal server error
Whenever I place my .htaccess file in my web directory I receive a 500 internal server error and within the error.log file specifying:
[Sat Jan 21 13:46:07 2012] [error] [client xx.xx.xxx.xx] Request ...
0
votes
2answers
355 views
domain.com to www.domain.com .htaccess redirect working except one subdir
I've setup a redirect in .htaccess to consolidate domain.com to www.domain.com traffic on our Apache server.
Looks like this:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ...
2
votes
1answer
1k views
How do I make SEO friendly URLs from my PHP pages?
I'm pretty new to this and was wondering how to turn my site URLs into SEO friendly URLs using .htaccess and mod_rewrite?
My URLs take the form mydomain.com/index.php?pid=1&pagename=Some Page
I ...
1
vote
1answer
1k views
Access Forbidden! Apache Windows XP
This is a great tutorial on how to server websites other than in default htdocs folder in XAMPP. It worked for me the other day but then I had to reinstall XAMPP (1.7.7 was 1.7.6) and now I am getting ...
0
votes
2answers
925 views
.htaccess rule not working without HTTP redirect [R]
I am using the following .htaccess with Wordpress to remove index.php from the visible URL. This works but forces an http redirect so the URL changes in the browser window. If I remove the [R] it no ...
0
votes
1answer
230 views
subdomain to subdomain forward with masking
I want to forward with mask from one server to another server.
In Server One:
www.abc.com
test.abc.com
live.abc.com
In Server Two:
http://ipaddress.com/folder1
http://ipaddress.com/folder2
...