.htaccess

.htaccess alias URL

Hi I am trying to create a redirect of a temp URL using Redirect Permanent /dir/subdir http://www.domain.com/other_dir/htmlfile.html Note that "dir" exists in the file structure but "subdir" does not. In the browser if I type http://www.domain.com/dir/subdir the redirect works (even though, again, "subdir" does not exist) but http:/...

Using the %{HTTP_HOST} variable for session.save_path in .htaccess

I'm trying to write an .htaccess file that will be placed on a number of different sites, and I don't want to have to change the domain in the session.save_path for each site. I'm trying to use the %{HTTP_HOST} variable but it's not working. The paths to the session storage folders on the server look like this: /var/foo/vhosts/siteone....

Partial URL redirect with .htaccess

Hi, I'm need to redirect a a bunch of URL's through mod_rewrite. The URL structure is as follows: www.mysite.com/somescript.php?&lang=asp&variable1&variable2 Needs to redirect to www.mysite.com/somescript.php?&lang=php&variable1&variable2 So, basically, any URL with &lang=asp in it needs to be redirected to exactly the same URL bu...

how can i avoid and allow subdirectories in htaccess

I want the following url http://www.mydomain.com/user.php?id=username to http://www.mydomain.com/username via .htaccess... i also want to avoid subdirectory name conflict.... where i have a rewrite rule i.e RewriteRule ^home/$ home.php?id=$1 [NC,L] so my url become http://www.mydomain.com/home/ so i want this home to be ignored...

Setting up Drupal and Wordpress under a single document root

I have a hosting account which provides me a folder to publish my files for my domain (say www.example.com). I have set up Drupal for www.example.com with .htaccess at the top folder to enable clean-urls for the Drupal installation. Now I want to have a Wordpress installation under www.example.com/blog/ and have clean URLs for that blog....

Rewrite rule - but only if to a certain url

Hello all, I have a rewrite rule in my htacces that rewrites POST http authorization requests and converts it in to a get request. But this happens to every http auth request. I actually only need it to rewrite if it is going to the www.mysite.com/googlecheckout/api url: This is what I currently have: RewriteCond %{HTTP:Authorization...

.htaccess : if is an path, do nothing, else, do the rewriterule

Hello, I have a little question very simple this time I think... How Have I to write my htaccess to do this instructions : IF IS "/uploads" PATH INTO MY REQUEST, NOT REDIRECT AT ALL, JUST DO THE REGULAR REQUEST ELSE DO THE REWRITERULE : RewriteRule (.*) http://theDestinationDomain.com/$1 [P,L] I Have tested that : RewriteEngine on Rew...

Redirect IE browsers using .htaccess (away from an xhtml)

Hello, as the title says, I want to use an xhtml as my homepage and I want to redirect visitors using Internet Explorer browsers to a different page (a .htm with less content that says "You're using IE, tough tittie."). Since IE automatically downloads app/xhtml files, I can't do this using javascript and whatnot, so I think the only op...

Url rewriting causes Magento admin to become inaccessible

I have magento in a subdirectory in the root and if I set the secure base url and secure base url link to the correct shared ssl url to enable secure pages I have no problem in the FRONTEND. The pages displays as they should. However when I try to access the admin with the secure link below I cannot gain admittance. For instance in the...

[HTACCESS] Redirect to a .html if from some domain

Hi! I have two domains that are pointing to the same directory, but I would like to redirect them (via mod_rewrite in htaccess) to some specific .html when hitting home. Like: if (domain == 'firstdomain') redirect firstdomain.html else if (domain == 'seconddomain') redirect seconddomain.html Thanks! Joe ...

I have no "AllowOverride" directive in my apache2.conf

I have viewed my httpd.conf and apache2.conf and I have no AllowOverride directive in either of the files. The .htaccess works fine. I have a bunch of rewrites in it, so I know it works. Is apache2 by default set to "AllowOverride All"? Anybody know if I should add this? Or if it would hurt to add it? The reason for all this is that ...

htaccess rewrite rule redirect

I have some old urls http://www.website.com/result/?q=&result=1 http://www.website.com/result/?q=&result=2 http://www.website.com/result/?q=&result=3 http://www.website.com/result/?q=&result=4 etc.. probably going up to about 60 Is there anyway I can create one rule that redirects any query that looks like this to the...

Internal rewrite+Setting environment variables with mod-rewrite/.htaccess

Hello, I am trying to achieve the following through mod_rewrite: 1. What is the basic directory structure? / main/ (folder) a bunch of PHP files some_folder/ (folder) another_folder/ (folder) ... (an arbitrary number of such folders) yet_another_folder/ (folder) .htaccess(the magic goes here) 2. What I am trying to do? In thi...

Problem with .htacess !

How do i convert this URL http://engine.searchr.us/web-search.phtml?search=SEARCHED+TEXT to http://engine.searchr.us/web-search/search/SEARCHED-TEXT.html Is it possible to this using .htaccess and what should i code in the .htaccess for doing this ? and i should place the .htaccess in the engine folder right ? Thanking You, 5416339...

PHPonTrax on Dreamhost

Has anyone had any luck with setting up PHPonTrax on Dreamhost? I have a subdomain ..say subdomain.domain.com where i have a folder called quiz which contains my PHPonTrax app. There are two problems for which I need help. 1. Since PHPonTax gives a public folder with a htaccess file that handles all requests, I want it so that everyti...

PHP Redirect to Different location using Htaccess

Hi, Consider I have a url request as follows http://www.example.com/ or http://www.example.com it should redirect to http://www.example.com/index.php/lorem/ and also for http://www.example.com/index.php request should keep in the same location as http://www.example.com/index.php Thanks ...

static page links not working without index.php in front

Hi, I created static pages in admin and when I try to open www.website.com/static-page-identifier We get 404 page If we put index.php in front like this www.website.com/index.php/static-page-identifier It works I have checked that mod-rewrite works on server. I have been switching 'Use Web Server Rewrites' to yes and no in magen...

mod_rewrite problem, with accessing files?

i have this file that is on the root folder called sumbit.php and when i acesss a page like this for exmaple http://www.example.com/viewtopic.php?topic=14 the new url is http://www.example.com/topic/14 on firebug its saying its accessing http://www.example.co.uk/topic/submit.php, when its meant to access http://www.example.co.uk/...

Allowing PHP $_POST with htaccess

Hi all. I'm not so good on htaccess but was happy with what I had done so far until I noticed my $_post variables were not being processed because of the rewrite signiture within my htaccess file (SIGH) My objective was to read the url and determine it's path and location from php and it's $_SERVER['request_uri'] method, which works fin...