Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

5
votes
1answer
630 views

How can redirect pages from old core PHP site to new Joomla site?

We have our old site into core PHP and we have developed it again into Joomla 1.5 last year (because of some limitations we have to build it into 1.5). Now the problem is the URL of sites changed as ...
1
vote
3answers
6k views

How do I do URL re-writes on Plesk?

I am very new to URL re-writing and I am using Plesk which is window-based web server, hence I can't use Apache's mod_Rewrite. Can anyone tell me what is the proper procedure for this?
1
vote
2answers
281 views

How do I redirect www and non but not IP

I am trying to redirect www.domain.com or domain.com to www.domain.com/temp.html I am using the following code: RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^/?$ ...
5
votes
1answer
658 views

URL masking with .htaccess

I need a hardcore programmer to help me with URL masking. So this is my situation. My website www.michaelfotograf.dk/blog/ is the main site that needs to be configured. I have another ...
2
votes
1answer
241 views

How to hide download file from bots? [duplicate]

Possible Duplicate: How to restrict the download of all files in a folder? I want to make a private file available for download but not use username/password protection. I want to put the ...
1
vote
1answer
179 views

Is it possible to use two different ErrorDocuments for different paths of a website?

I currently run PmWiki at mydomain.com/pmwiki. I have a 404 page and .htaccess set up in my site's document root for 404 pages regarding anything that doesn't have to do with my wiki. By default, ...
0
votes
0answers
198 views

SIMPLEST way to set up password protection for a static site, with basic admin UI?

I have a static site. I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about ...
7
votes
3answers
257 views

How to re-direct Wordpress posts with 301

All my WordPress post URLs generate sub directories with duplicate content and I do not know what regular expression to use to consistently 301 redirect domain.com/category/post/random-number/ to ...
7
votes
1answer
311 views

home page of my site is not appear in google search, when I type site:example.com

I am totally confused, when I place site:example.com in google I see every page of my website in serp(search engine result page) except the home page. I don’t know why it’s happening but I check ...
2
votes
1answer
146 views

How to track a cronjob running on my site?

I have an old Joomla 1.5 site hosted on a shared Bluehost server. Recently my .htaccess files are being rewritten every 10 minutes, and the site has been black listed. It looks like some php cronjob. ...
2
votes
1answer
365 views

Need a generic way to create SEO friendly URL

I have searched a lot and implemented many many Regular Expression in my .htaccess file but can not succeed. How do I find a generic way that make my URL SEO friendly? Currently this is in my ...
5
votes
2answers
797 views

.htaccess two different rules but only one per time

I'm rather new to the whole .htaccess thing and I'm using the following right now to use 'pretty url's': <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d ...
1
vote
1answer
139 views

Apache URL Rewrite

I'm trying and failing to get a URL rewrite working, firstly I'm doing it in the vhost declaration, is that right? What I'm trying to do is take any URL which has; view.php?id=[a 1 or multidigit ...
3
votes
1answer
142 views

URL hex characters in .htaccess

There is an old page with a space in the filename, and this is no longer found on the website. So I need to redirect this page to another page using a 301 redirect in .htaccess. If I place the ...
3
votes
1answer
669 views

Wild card redirect in htaccess giving error this webpage has a redirect loop

In my website I changed the directory name "vehicles-cars" to "vehicles-cars-for-sale". When I tried to redirect using a wild card redirect from my old directory name to new directory name in my web ...
4
votes
1answer
711 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/ ...
2
votes
1answer
652 views

.htaccess 301 Redirect for wildcard subdomains

I run WordPress in Network mode, which means I can have multiple websites running off one installation of WordPress. Each website runs as a subdomain. WordPress handles this using .htaccess, and a ...
3
votes
1answer
503 views

Disallow all user agents except one using .htaccess?

I've been struggling to get this .htaccess working. The aim is to disallow all user agents besides my app. The app sends a GET request with a user agent of lets say 'AcmeUpdater'. Whenever I try to ...
1
vote
1answer
403 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
278 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
2k 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
309 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
74 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
249 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
292 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
314 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
4k 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 ...
0
votes
1answer
154 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
169 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 ?
0
votes
1answer
189 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
455 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
140 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
349 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
996 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
4k 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
380 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
744 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
547 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
190 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
108 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
305 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
4k 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
449 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
222 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
566 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
264 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
283 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
445 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 ...