.htaccess

Phusion Passenger Configuration via .htaccess

I'm trying to install Redmine, and I am having trouble making Phusion Passenger work with any directories other than the DocumentRoot. I've put the public directory downloaded from Redmine into ~/www/public/entry/redmine.mysite.com/, and the rest of the directories in ~/www/app/redmine.mysite.com/. I've added the following line to the ...

Restrict access to web directory but allow sub-domain

I am trying to deny access to a sub-domain directory from people accessing directly rather get them to browse to the sub-domain directly. For e.g I want people to be able to go to http://test.example.com and not http://example.com/test. If they do show a 403 Forbidden error. Is this possible through htaccess ? Googled it but cant see any...

http://mysite.com/foo/bar loading http://mysite.com/foo.php

I initially thought this was a problem with my .htaccess files, however even after disabling mod_rewrite the problem persisted. http://mysite.com/foo/bar is loading http://mysite.com/foo.php with this true for file foo being in any folder on the server. Does anyone know what is causing this behaviour and how I can stop this, as I want it...

htaccess calling rewrite rule on everything

This is my htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Static pages RewriteRule ^print/([0-9]+)$ index.php?action=PublicDisplayPrint&page_id=$1 [L,QSA] RewriteRule ^email/([0-9]+)$ index.php?action=PublicDisplayEmail&page_id=$1 [L,QSA] RewriteRule ^login$ index.php?action=Pu...

$_Get not working in this particular case..

I am trying to use http://www.example.com/news/id/21/title/top-10-things/?page=1 for sending the page parameter and it is not working in php below is my setting in the .htaccess file Options +FollowSymLinks RewriteEngine on RewriteRule ^news/(.*)/(.*)/(.*)/(.*)/$ /news.php?$1=$2&$3=$4 RewriteRule ^news/(.*)/(.*)/$ /news.php?$1=$2 Rewr...

.htaccess rewrite with drupal and clean urls only partially works?

Hey all, I am having an unusual access problem with Drupal running on a MAMP (Mac OSX, Apache, MySQL, Php) stack. The Drupal install is working fine, so I know it's not a Drupal issue. "Clean URLs" are working fine for anything with a single-level url, but nothing with 2+ path levels. For example: example.com/foo, example.com/bar, etc....

redirect ID numbers to sub domain

www.mydomain.com/1233.html this is the main topic which we have in the website and i need remove my script from this site and who ever will enter this link will be redirected to the link below myprogram.mydomain.com/v2/1233.html what is the process on doing so and the setup required for the file below ? .htaccess ...

How do I change the site root

I have used absolute links throughout my site, the problem comes when I am trying to set up a testing version in a subdirectory on another server. For example, the document structure is /images/image.jpg on the live server, but /subdirectory/images/image.jpg on the testing folder. What is the solution? Cheers. ...

Will this robots.txt only allow googlebot to index my site?

Will this robots.txt file only allow googlebot to index my site's index.php file? CAVEAT, I have an htaccess redirect that people who type in http://www.example.com/index.php are redirected to simply http://www.example.com/ So, this is my robots.txt file content... User-agent: Googlebot Allow: /index.php Disallow: / User-agent: ...

Will googlebot index my index.php even with an htaccess redirect?

Using a redirect statement in my htaccess file, people who type the following into the address bar... http://example.com/index.php ...are redirected to... http://example.com/ I also have a noindex, nofollow meta tag on all my website's pages. My question is, given that redirect behavior and meta data, will googlebot index my mainp...

redirect all pages (website) to a folder within the same domain..

Hi guys, can anyone of you tell me whatever should I use so that I can redirect all of my pages (entire website) from root/folder1/* to root/folder1/folder2/* Also along with this I would like to redirect all the pages from root/folder3/* to root/folder1/folder2/* please give the code(s) to be written in .htaccess and also also where t...

IP range in .htaccess file

i want to get access to a ip range with this net feature: 68.241.45.0/20 in .htaccess file and in RewriteCond. some thing like this: RewriteCond %{REMOTE_HOST} !^68.241.45.0/20 but it seem doesn't work. would you help me? ...

.htaccess url-rewriting help

I'm a bit confused on url writing in .htaccess and have a question about rewriting urls. My first question is I'm trying to do is have a one .htacces to make the urls go from http://www.website.com/index.php to http://www.website.com/Home/and another .htaccess to go from http://www.website.com/index.php to http://www.website.com/home.ht...

Link Duplicity problem with .htaccess and mod_rewrite

Sorry I couldn't come up with a better title. Here is my htaccess RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [L,QSA] And this is my problem: localhost/validpage gives me the contents of localhost/validpage.ph...

htaccess Rewriting a URL with a comma

I need to rewrite a url that contains a comma to another URL. The original URL also contains +'s (pluses) which I have figured out need to be escaped with a backslash, but the commas don't seem to be read properly. Here's what it looks it like: RewriteRule ^locations/New+York/Buffalo,\+Erie\+County,\+and\+Surrounding\+Areas$ "/locations...

pyrocms installation in a subdirectory with wordpress installed in the root directory

Been at this for a while, so I figured I'd ask for help. Here's the .htaccess file for wordpress in the root: AddHandler x-httpd-php5 .php AddHandler x-httpd-php .php4 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond $1 !^(community)(/|$) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_...

Need a Mod rewrite regex solution for .htaccess

I moved my site to different server since then my all urls started showing up 404 error. earlier my all urls were like this mysite.com/title-of-url but now all such urls are getting 404 error, so i disabled seo friendly url feature on site admin and now i can access same page on mysite.com/index.php/title-of-url i tired to create some...

.htpasswd in codeigniter

Hello there I want to password protect one of my controllers in codeigniter. This is the code in .htaccess # password-protect single file <Files my_controller.php> AuthName "my_controller.php" AuthType Basic AuthUserFile /home2/afolder/.htpasswds/.htpasswd require valid-user </Files> the problem is that myController.php will show up i...

Can I make a dynamic .htaccess file?

Can I make my .htaccess be generated with php? I would like to use php to dynamicly create my htaccess file from information from the database. It would save me the trouble of making a new .htaccess file whenever I change a bit of my code. ...

301 Htaccess RewriteRule Query_String

Problem: Visitors open the url website.com/?i=133r534|213213|12312312 but this url isn't valid anymore and they need to be forwarded to website.com/#Videos:133r534|213213|12312312 What I've tried: During the last hours I tried many mod_rewrite (.htaccess) rules with using Query_String, all failed. The last message in this topic shows a ...