Tagged Questions

Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
859 views

.htaccess RewriteRule $1 contains wrong value

I have a RewriteRule that is not behaving as I expect. I want site.com/author/fred to map to site.com/author/index.php?a=fred I have an author directory within the site root. The author directory ...
0
votes
1answer
102 views

Prevent hotlinking of attachments

People are able to embed my forum's attachments (vbulletin). I tried to create an htaccess rule for the hotlinking, but it did not work. RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ...
0
votes
1answer
118 views

Why Google indexing blog.mywebsite.com instead of www.mywebsite.com?

All subdomains works in my website, example this: mywebsite.com www.mywebsite.com blog.mywebsite.com feed.mywebsite.com anything.mywebsite.com But Google indexed some of my website pages with ...
2
votes
1answer
434 views

403 error with a 301 redirect in .htaccess

I wrote a rewrite rule for one of my pages. This rule is supposed to be for a specific single URL only hence the "static-ness". RewriteRule ^picks/categorizedPicks/126$ ...
0
votes
1answer
120 views

Rewriting isn't doing what's expected

I've got a simple web.py application, running at Dreamhost. The .htaccess file, per the DH documentation is in the example.com home directory, not public: Options +ExecCGI AddHandler cgi-script .py ...
1
vote
1answer
445 views

URL redirection to same domain on different server

We have existing domain on non-IIS server and now we have moved it to IIS server. Client want us to redirect the URL from existing server to new server with same domain name. We will modify the ...
0
votes
1answer
592 views

.htaccess 301 rewrite rule not working

I had made the page the-book.html in wordpress site, later changed the name to about-the-book, now i have written the .htaccess file as **RewriteRule ^the-book.html$ ...
2
votes
1answer
89 views

What's the “^” in RewriteRule Statements?

I keep seeing the ^ character in RewriteRule statements in a context that doesn't fit with the usage specified here. For example: RewriteRule ^(.*)$ $1.php [L,QSA] What does it signify?
1
vote
2answers
171 views

Rewrite Issue on index.html

I have index.html on my html_directory on my website also I entered a rule as follows: RewriteRule ^index.html$ newindex.php It seems requests to my site is routing to my index.html file , my ...
0
votes
1answer
69 views

Redirect does not work

I tried to redirect a broken link onto my site by redirect : RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^domian_registration\.html$ "http\:\/\/mysite\.com\/domain_registration\.html" [R=301,L] But ...
2
votes
1answer
201 views

How to come back to old URL already redirected with 301? What is the impact to SEO?

I have recently moved my old site (built with DreamWeaver) to a new one (with new design and using WordPress). It was done last August, 1st and as the URLs with WP changed completely, I had to do ...
3
votes
1answer
13k views

How to redirect any URL to lowercase URL?

I have this .htaccess files: ErrorDocument 404 /index.html <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com [NC] RewriteRule (.*) ...
0
votes
1answer
166 views

Is it possible to limit user access to folders using HTACCESS?

Is it possible to limit user access using a HTACCESS file? I'm not quite sure how to edit folder permissions with the host i'm with so I figure using an HTACCESS file might be easier.
1
vote
1answer
592 views

Can Apache “Correct” URL Case?

Let's say I keep every word of file names capitalized. For example, Home.php or MultipleWordTitle.html. Is there any way for Apache to redirect requests for incorrectly-cased URLs to the capitalized ...
1
vote
1answer
279 views

How to point two domains to one ip address with a sub-domain

I am a little stuck here I currently have a domain: www.my-site.org & m.my-site.org I want to point m.mainsite.org to m.my-site.org I already have an A record created for m.mainsite.org I need ...
1
vote
1answer
316 views

how can I set my site root from: localhost/mysite/ to: localhost/mysite/view/ via htaccess

hi just wondering if this is possible, when you access my default site directory localhost/mysite I want to set the path to render localhost/mysite/view/ all my html pages will be rendered here just ...
0
votes
1answer
101 views

seo htaccess 301 redirect

Have an SEO question. I have been checking the progress of my site indexing in Google, for some bizarre reason best known to itself, there is a very random URL indexed against my domain which doesnt ...
-1
votes
2answers
2k views

Having trouble redirecting old product sites and categories to new pages

I recently upgraded a shopsystem to prestashop and imported the previous products (~1200), and I managed to keep the old category_id and product_id. I'm trying to set up those 2 rules to redirect all ...
0
votes
1answer
453 views

Htaccess 404 & 301

The site is run on wordpress (latest) and is installed in /htdocs/www/ This htaccess file is in /htdocs/www/roh/ along with a bunch of images & some css. I want requests to the old html files to ...
1
vote
1answer
497 views

Setting up a redirect from 'www.example.com' to 'www.mysite.com/blog'

hopefully someone can give me a roadmap to get this done. I run a self-hosted Wordpress blog at http://www.example.com which has numerous posts/links such as ...
2
votes
2answers
1k views

Joomla 1.5 to Wordpress 3.1 migration: how to redirect Joomla's permalinks

I'm migrating a Joomla 1.5 site to a WordPress 3.1 site (I will later update to WP 3.2.x) and I've found the right tool to do it, a plugin called Joomla 1.5 Importer. There is another plugin called ...
0
votes
1answer
336 views

Read data from a folder in main domain folder (CPanel\WHM)

I have defined a host in my CPanel\WHM server and put all my websites under one host account. The host Main Domain is domain.com, and all other websites are Add-on Domains: domain.com --folder ...
1
vote
1answer
250 views

Redirect directory URL to instead have .html suffix

htaccess redirect (301) all my old content from my WordPress to my new URL design. I want to redirect all the last trailing slashes to .html ... the permalinks are already working, but I don't want ...
0
votes
1answer
165 views

I have 2 domains one main, one parked. I recently switched but host provider told me theyd repoint the DNS but there are problems? Do it via DS

I wanted to switch my site from www.mutantspace.ie to www.mutantspace.com. Up until now the .com was my parked domain. I looked into it and was told that using this code in my .htaccess file in ...
4
votes
6answers
622 views

SEO - which URL's are the best?

I'm using .htaccess with RewriteRule to create SEO-friendly URL's. However, I have a few questions about this: First of all, I noticed many websites end their URL's with .html (or another ...
1
vote
1answer
202 views

Redirection with PHP or .htaccess - which is better for SEO?

I need one practical advice - is better to redirect with .htaccess Redirect 301 rules, or to use PHP header function (after parsing URL)? Which one is better to Google and SEO? Tnx in adv!
0
votes
1answer
153 views

Having hard time to hide directories on my site

i'm trying to hide some directories on my site by returning 404 not found error codes instead of forbidden, the problem is that the files in the directory becomes not available to php. how can i hide ...
0
votes
1answer
285 views

ISAPI_Rewrite and asp.net events upon postback

I have a rewrite rule to rewrite www.mysite.com/default.aspx to www.mysite.com. RewriteRule ^default.aspx$ / [NC,R=301,L] On that site i have an asp.net server Button. When i click the button it ...
2
votes
1answer
452 views

Modify .htaccess to allow existing files without extension to be served

I have the following .htaccess: #If the requested URI does not end with an extension OR if the URI ends with .php* #(where * is optionally one or more numbers) RewriteCond %{REQUEST_URI} !\.[^/]+$ ...
2
votes
1answer
1k views

Multilingual and SEO URLs - best practice?

What would you recommend as a URL structure for setting up a multilingual site when optimizing for SEO? I'm thinking: www.yoursite.com/en/some-category/some-article/ ...
1
vote
1answer
198 views

product in multiple categories - duplicate content problem [duplicate]

Possible Duplicate: Content appearing under multiple categories; anything I can do to prevent duplicate penalty? What is the best practice to display a product that may be in several ...
5
votes
1answer
101 views

Restrict access to directories hosting different sites

My hosting provider requires that my primary domain (let's call it example.com) points to my public_html root. I also own several other domains (let's call them exampleA.com and exampleB.com) that are ...
1
vote
1answer
855 views

How do I get mod_rewrite working with typo and wordpress?

I've some trouble with typo3 (mydomain.net) and wordpress (mydomain.net/blog/) using mod_rewrite. First I was running a typo3 installation which uses mod_rewirte without trouble. Now I'm trying to ...
1
vote
1answer
598 views

htaccess and 301 redirects - multiple domains

I have the following which redirects mydomain1.co.uk and mydomain1.com to www.mydomain1.com perfectly. RewriteCond %{HTTP_HOST} !^(.*)\.mydomain1\.com$ [NC] RewriteRule ^(.*)$ ...
3
votes
3answers
2k views

Subfolder won't permenantly redirect to subdomain

Right now I have the following code to redirect all non-www URLs to www URLs: RewriteCond %{HTTP_HOST} ^example.com RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] Besides that redirection, ...
1
vote
0answers
69 views

Setting up a subdomain for an already existing subfolder [duplicate]

Possible Duplicate: Subfolder won't permenantly redirect to subdomain I have a forum installed in a subdirectory (http://www.example.com/forums/), but I want to have it accessed through ...
2
votes
2answers
65 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
152 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
333 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
144 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
95 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
127 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
614 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
97 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 ...