.htaccess

Problem with rewrite rule

Can anyone explain to me why this rewrite rule doens't work: RewriteRule ^architecture/([a-zA-Z_]+)/(.*).html$ web/index.php?field=1&sub=$1&name=$2 on this url: http://localhost/greenlinked1-6.com/architecture/projects/84-test-deeplink-test.html And what I should do to get it working. I've tried to find the answer in several articles...

GoDaddy + htaccess mod_rewrite NOT WORKING!

I recently started using GoDaddy's shared hosting, but now my htaccess rewrites are not working. Here's the problem: I go to http://grantman.net/category/software, which should display http://grantman.net/category.php?c=software, but instead it's displaying a 404 Not Found page! I know my htaccess file is being read, so that's not the ...

Domain links to Landing Page - How to with .htaccess

Hello we have a store with www.webshop.com. Now we want to route another Domain (www.good-sportshoes.com) to a Landing Page in www.webshop.com/sportshoes - but the URL should stay as "good-sportshoes.com" until the User click on another Link, than he will be redirected to www.webshop.com/whatEverTheLinkIs. I am not so exprienced in .ht...

htaccess file nomenclature creating problem in opening a popup window in IE

My htaccess file nomenclature creating problem in opening a window in IE EDITED I have to open a colour picker which needs t be opened in popup, and I have window.open('picker.html', null, "help=no,status=no, scrollbars=no,resizable=no,toolbar= no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true); my base url go...

Need to rewite question marks and equals signs in url.

Rewritten my url. However I can still access rewritten urls with question marks and plus signs. lovelakedistrict.com/lake-district-cottages/?cottages=2/ lovelakedistrict.com/lake-district-cottages/?cottages/2/ lovelakedistrict.com/lake-district-cottages/cottages/2/ The three urls above are the exact same page, I would like to properly...

.htaccess not working

I have a .htaccess file to remove the index.php part of the codeigniter-style URL. It's been working fine on one computer but when I copied the file over to my laptop it doesn't seem to do anything. I'm using localhost on both machines. They both run mac osx 10.6 with the bundled apache and php and the latest version of mysql. Everything...

Get htaccess to add value as GET variable when redirecting

Hey, Simply put, what I want to achieve is this, www.example.com/show-products/food should be redirected to www.example.com/show_products.php?cat_id=1 or www.example.com/show-products/clothes should be redirected to www.example.com/show_products.php?cat_id=8 But, I want htaccess to send the GET variables from the URL to the script ...

.htaccess: how to restrict access to a single file by IP?

I've look all over, but keeps running into same info that talks about directory level IP restriction, which usually looks something like this: Order Deny,Allow Deny from all Allow from 123.123.123.123 Is it possible to have same type of access restriction tied to a page/document? ...

Index File in .htaccess

In my htaccess file I have the following redirections: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] RewriteRule index.html$ Controller/index.php [L] </IfModule> I want index.html (which does not exist) to be redirected to my controller. index.php (...

clashing htaccess rules .php file extention still accessible

I have been trying to get my urls re-written. The first 4 rules are vital, but they are clashing with this line: (i think). RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^.#?\ ]+)\.php([#?][^\ ]*)?\ HTTP/ this stops the url being able to be accessed like so www.example.com/page.php and redirects to www.example.com/page/ after adding the fir...

htaccess - Rewriting requests for subdomain to a folder, with query string

Hi, I'm trying to get a subdomain rewrite working using an Apache htaccess file and need some help please. I am trying to get requests for http://xyz.example.com internally handled as if the user had requested http://example.com/xyz so the user does not see this URL in their address bar - they see the subdomain version. This is slight...

Rewrite query string in .htaccess

I'm trying to do a very simple rewrite of a query string and I'm having no luck at all. I need to go from http:// example dot com/?ACT=jquery to http:// example dot com/index.php?ACT=jquery This is the code that I've written in my .htaccess file and it throws me an internal server error. I'm really new at this whole mod rewrite b...

php : SEO friendly urls

Hello, I am working on a new project, I want to create SEO friendly URL's for this site like mysite.com/first_content, mysite.com/second_content. URL's must be dynamic which means URL's must related to the content title. How can I done this ? Is is possible to use htacess, ? Thanks ...

PHP : dynamic sub domains for each user using htaccess

Hello guys is it possible to create dynamic sub domains for each user using htaccess. for example if there is a user with user name myusername, then add a sub domain for him like htttp://www.myusername.example.com, and when somebody load this page it should come as http://www.example.com/?user=myusername ( using htaccess ) Is it possi...

Rewrite for all images AND one particular php filename

As a precaution against hotlinking, I've been using the following rule to redirect people with the wrong referrer to our logo instead of the actual image: #Naughty hotlinkers RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !sitedomain\.com [NC] Rew...

htaccess rules differs in local and live server

Hi I have PHP oscommerce website, in which I have used htaccess for url rewriting to hide file names, now the problem i am facing is that my local server cannot replicate the htaccess as it should be doing, It is working perfect in live site.. Can some suggest what could be the reason? EDITED Below Is the htaccess rewrite rule i...

Plus signs being replaced for %252520

When I click on my index'd pages in Google the plus signs in my query string are being replaced (encoded?) for %252520. Anyone know why? Example: lovelakedistrict.com/result/?q=Private%252520car%252520park&page=2 should be lovelakedistrict.com/result/?q=Private+car+park&page=2 I have heard that this is a result of redirecting my ...

301 redirect using htaccess

Hi all, I had to change the link structure on my site, and to maintain my SEO value I'm trying to setup some 301 rules based on htaccess. My old setup was this: http://www.domain.com/news/23/some-text-here My new setup is this: http://www.domain.com/read/some-text-here RewriteCond ^(news)/([0-9]*)/(.*)$ RewriteRule ^(.*)$ http://ww...

change word in refered url to direct to correct page

I recently changed a word in my query string in my url, which causes the query to break, so I wish to redirect the old url to the new one. example: http://www.lovelakedistrict.com/result/?q=Windermere&amp;result=2 new url http://www.lovelakedistrict.com/result/?q=Windermere&amp;page=2 What would be the best solution for this, is t...

get variables in query string re_writes

I am trying to combine these four get variables (sch, val, lmt, ord) into a nice looking url re_write. Currently I have the following in my .htaccess file and it works if all variables are included, however, if I only input the first two variables (sch & val) it breaks: RewriteRule ^search/([^/]*)/([^/]*)/([^/]*)/([^/]*)$ ...