.htaccess

htaccess rewrite only part of the querystring

Hi, I am trying to perform the following rule in htaccess: www.domain.com/folder/?id=14077&c=en-gb -> www.domain.com/folder/?id=14077 www.domain.com/folder/?c=en-gb&ID=14077 -> www.domain.com/folder/?id=14077 www.domain.com/folder/?id=14077&c=fr-fr -> www.domain.fr/folder/?id=14077 www.domain.com/folder2/?c=fr-fr&ID=1...

htaccess querystring to multiple paths

I've got a site with the following .htaccess rule: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?id=$1 </IfModule> It works great but I need to expand it so that IF there is another path taken by the user, I can forward it (but the root p...

url in subfolder?

Please help me. How can I do for www.example.com/search.php?q=skipsoft to www.example.com/skipsoft? ...

.htaccess rewrite rule preventing infinite loop

I have a directory named dollars that contains a file index.php. I would like for the url http://localhost/dollars/foo to translate to dollars/index.php?dollars=foo. This is the .htaccess file that I currently have in the dollars directorty: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !^index\.php RewriteRu...

URL Rewriting in Joomla

HI i want to rewrite my home menu http://example.com/main/ to http://example.com/main/index.php only . How can i do this using .htaccess Thanks ...

Helicon Isapi re write not working on shared hosting

Hi all, I have a shared hosting solution, and I am trying to use Isapi re write with it. I have two problems, the first is that when I use a .htaccess file i get an error abot IIS password not working. I think this is because there is a service called iis password installed that looks for a .htaccess file first. (I don't know what it d...

htaccess 301 redirect not working

I'm trying to add a simple 301 rule to the .htaccess file of a codeigniter site. redirect 301 /newsletter http://sub.domain.com/newsletters/may2010 When I visit http://sub.domain.com/newsletter the redirect goes to http://sub.domain.com/newsletters/may2010/?/newsletter I'm not sure where the ?/newsletter is coming from. Full .hta...

redirect to http

I have some rewrite rules in my .htaccess that switches the domain to https if its a secure area. I want it to switch back to http if its not a secure area, heres my rules: RewriteCond %{SERVER_PORT} =443 RewriteCond %{REQUEST_URI} !^/account(.*)$ RewriteCond %{REQUEST_URI} !^/shop/checkout(.*)$ RewriteRule ^(.*)$ http://www.domain.com/...

URL Re-Write Rule Not Working

Hello, I am trying to rewrite URLs ending like (not only exactly equal to) this: comments/The-Latest-Out-of-Pakistan/68 into URLs ending in this: comments/index.php?submissionid=68 Below is what I have in the .htaccess file, but it's not working. RewriteEngine On RewriteRule ^comments/([A-Za-z0-9-]+)/([0-9]+)?$ comments/in...

Do I need to change anything in php.ini to make changes to .htaccess?

Hello, I am trying to put a rewrite rule on .htaccess, but it's not working. Do I need to make a change to php.ini to enable rules to be added to .htaccess? Thanks in advance, John ...

.htaccess if/else depending on {SERVER_NAME} ?

I have this .htaccess file but I would like it to only do this when I'm on the live site. Is there any way I can: // if server_name looks like example.com to this // else dont run this bit RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} (auth|register|secure|payment|admin|trading_careers) RewriteRule ^(.*)$ https://%{SERVER_NAME}%{...

how to serve PHP together with Django?

i have a Bluehost hosting account, and i manually configure django with this tutorial, but now i need to run php scripts into a subdomain or in subfolder, how can i do that? my root .htaccess look like this AddHandler fcgid-script .fcgi # For security reasons, Option followsymlinks cannot be overridden. #Options +FollowSymLinks Options...

How to disable the DEFLATE module for a specific directory?

I am trying to figure out how to disable the DEFLATE module (gzipping) for a specific directory on my server. This is what I have in /etc/httpd/conf/httpd.conf AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-...

How to put the logged in users username in the URL?

Hello all, I am making use of Codeigniter and I currently have this URL format setup: http://example.com/view/ I would like to put in the logged in users username in the URL and remove the view part of the URL. The view is my controller. So I can have something that looks like this in the address bar: http://example.com/johnny How...

Rewrite redirects the simple regex to base file.

I'm trying to do the basic mod_rewrite clean URL trick, where /category/item rewrites to /category/index.php?id=item. In the /category directory, I have this in my .htaccess file: Options +FollowSymLinks RewriteEngine on RewriteBase /category/ RewriteRule ^(.+)$ index.php?id=$1 [L] It sends the request to the index.php script jus...

setting up a subdomain to point to a folder using htaccess

hi guys I've build a website using the zend framework and using clean urls - however I need to set up a subdomain such that it points to only one folder on my website i.e I want the subdomain admin.mysite.com to point to mysite.com/admin and I wanna do it using my htaccess file EDIT ------- This is my htaccess file: RewriteEngine on ...

Running a different CMS system under drupal folder.

Hi friends, I'm a drupal newbie... I completed my first drupal site. then client wanted to run their old CRM under new drupal site, they uploaded CRM folder into drupal folder, and when I try to address the CRM admin, as below, it redirects drupal 404 page (which is search page). www.blablabla.com/crm/admin Error message from dru...

.htaccess allow one specific file format only

Hi, I have a directory but only want one file type to be listed. I've tried the following: <FilesMatch "\.(?!ext).*$"> Order Allow,Deny Deny from all </FilesMatch> However it gives me a 403. Is there any way to do this? Thanks ...

RewriteRule in htaccess question.

Could anyone explain the following line please? RewriteRule ^(.*)$ /index.php/$1 [L] Thanks in advance. ...

Remove ".html" from URL via .htaccess for a WordPress website

Background information: I've searched stackoverflow for a specific solution and couldn't find one that fixed my situation. Thanks in advance for any help you can offer. Your knowledge is appreciated. I've decided to accept a contract to "convert" (in the client's words) a Joomla site into a WordPress site. Everything is going along smo...