.htaccess

www.domain.com redirects to apache test page

I am using .htaccess file to redirect request to files. when i point my site using domain.com all the redirection works properly but when i point my site with www.domain.com it takes me to apache test page. This is my htaccess file <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\...

How get a like twitter url

hi ... i would like a simple help... i have a url like this: example.com/profile.php?id= & name= my .htaccess file like this. RewriteRule ^profile/(.)/(.) profile.php?id=$1&name=$2 so i have a end url like this: example.com/profile/id/name i can make example.com/id but how can i get a url like this: example.com/name ?? thax ...

Need help with .htaccess in a php application

Hello there, I would like to have some advance level help with .htaccess to setup url rewriting. Goto www.indiafood.co.in I would like to setup url rewriting there i have the logic of how i want it but not sure how to set it up in .htaccess. I want something as follows: (Sorry cannot post urls as i am new here) I would appreciate you...

Use a subdirectory as root with htaccess in Apache 1.3

I'm trying to deploy a site generated with Jekyll and would like to keep the site in its own subfolder on my server to keep everything more organized. Essentially, I'd like to use the contents of /jekyll as the root unless a file similarly named exists in the actual web root. So something like /jekyll/sample-page/ would show as http://w...

[^.] causing headache in RewriteRule

I am struggling with a very basic regex problem in my .htaccess file that I hope someone may be able to shed some light on. The basic premise is that I would like to teach Apache to switch any .html extension into a .var extension. I had thought that the rule would be positively trivial: RewriteRule ^([^.]+)\.html$ $1.var But the [^...

.htaccess mod_rewrite is preventing certain files from being served

i have a successful use of mod_rewrite to make a site display as i wish... however, i have migrated the 'mock-up' folder to the root directory and in implementing these rules for the site, some files are not being served in the ^pdfs folder: RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] (old directory) RewriteRule ^redesign_...

validating .htaccess before deployment

In order to get better SEO and cleaner URLs, I tend to export certain RewriteRules directly into the .htaccess (eg, RewriteRule ^The_North_Face(.*)$ index.php?a=brands&id=27&extras=%1 [NC,L] and so forth for each brand or category). It's a lot more complex than that but today I discovered that the file is only as good as the data it's tr...

.htaccess - redirect favicon

How do I redirect all requests for favicon.ico in root directory or any subdirectory to /images/favicon.ico ...

how do I redirect a user to a certain page using .htaccess

I have the following rule defined in the .htaccess file of my webapplication's root directory. RewriteCond %{REQUEST_URI} !^/classes/captcha.php RewriteRule ^([^/]*)/([^/]*)$ /index.php?client=$1page=page1 Now what I want is that when a user types in http://xyz.com/abc/page1, the address bar of the browser should display the origina...

htaccess redirect issue with /

I have the htaccess rules below that work almost perfectly. When I load http://localhost:8888/site/name/register/ it redirects to http://localhost:8888/site/name/fr/register/ as is intended. But when I load http://localhost:8888/site/name/register (sans trailing slash) the redirect does not occur. I'm sure I just need to add a slash so...

Redirect using .htaccess file. How?

I have a file as "documentRoot/app/webroot/myFile.php" I need to be able to access this file at "mySite/myFile.xml" ie when i type myFile.xml a call should goto "documentRoot/app/webroot/myFile.php" How can i do this by using .htaccess file?? ...

Wordpress permalinks problem

I changed my wordpress permalinks to %pagname%. Prior to doing this i posted two blog entries (the site is brand new). My static pages navigate fine after the changes but when you click on my posts you get 404'd. Has anyone else had this problem? Thanks. ...

Apache setting mod_auth_ldap require settings per sub-directory

I would like to set up a primary directory that has one set of LDAP-based restrictions and then have various sub-directories use other restrictions, but only have the actual LDAP search done in the base directory. For example: .htaccess per directory /Primary_Directory AuthLDAPURL "ldap://ldap1.airius.com:389/ou=People, o=Airius?uid?...

Can't I have more than a certain number of redirects using htaccess?

I've registered 3 domains, all for the same site. I've done this to catch people who can't remember the right URL. So I've got: domain.com.au domain.org domain.org.au The hosting is under #1, with #2 and #3 as parked domains. I want everybody to get directed to #3 (domain.org.au) because it is a site for non-profit charity in Austr...

.htaccess rewrite for all but domain itself to a subdirectory

Hi, There exists a blog at domain.com I wish to do a 301 redirect on anything that is after domain.com/[category/[post-name] to domain.com/blog/[category]/[post-name] The key here is when someone hits domain.com they just stay there. Only if there's any reference to posts within domain.com that I wish for the redirect to work. Will h...

What mod_rewrite rule will 301 redirect /example.html to /example?

I would like to translate or 301-redirect urls such as: www.domain.com/example.html to www.domain.com/example Here are the current rewrite rules: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [QSA,L] RewriteCond %{SERVER_PORT} 80...

Any way to know if .htaccess is enable?

Hi, any way to know if .htaccess is enable? I cannot read the httpd.conf file in my shared server. I have access through ssh. My hosting provider uses cPanel Accelerated. Regards Javi ...

like twitter url with rewritecond????

I would like a simple help. I have a URL like this: /profile.php?id=<id>&name=<name>. My .htaccess file like this: RewriteRule ^profile/(.*)/(.*) profile.php?id=$1&name=$2 So I have a end URL like this: /profile/<id>/<name>. I can make /<id>. But how can I get a URL like /<name>? I can use the RewriteCond to make a conditional? I s...

fetching article from mysql using slug

Hi all, i am writing my own news article section on my site, and store each article in a mysql database. Each article has a unique id, a title, the main body and thanks to the jquery plugin, it's own url-friendly slug. However, I am not sure how on earth I go about fetching the article when linking to the slug. How do i get: www.site...

Zend Framework Problem

Hi, i get sometimes this error: Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php:462 Stack trace: #0 /www/htdocs/w00a1ed7/autospin/redaktion/library/...