.htaccess

How to set upload_max_filesize in .htaccess?

I have try to put theese 2 lines php_value post_max_size 30M php_value upload_max_filesize 30M in my root .htaccess file but that brings me "internal server error" message ... php5 is running on the server I don't have access to php.ini so i think htaccess is my only chance. Can you tell me where is the mistake? Thanks in advance ...

Placing .htaccess file in var/www folder messes my website up...

I am playing with mod_rewrite now, and have successfully enabled it. However, I need to put a htaccess file inside var/www/ in order to achieve what I want, which is to rename Urls simply... When I place it my website becomes very strange and nothing basically works... Is there any code I need to put into the htaccess file in order for...

Host Primary Domain from a subfolder

I am having a problem making a sub directory act as the public_html for my main domain, and getting a solution that works with that domains sub directories too. Background My hosting allows me to host multiple sites, which are all working great. I have set up a subfolder under my ~/public_html/ directory called /domains/, where I creat...

Moving Wordpress from Apache to IIS

I've encountered a problem when moving a Wordpress installation from a Linux Apache server to a Windows IIS server. Nearly all pages load blank, including /wp-admin/. I created a php file in the main directory to check phpinfo, and it loads fine. I've copied the file system over, as well as the database. I've also updated the wp-config....

.htaccess wildcard problem

I've come across a problem with an .htaccess rule I can't sort out. It works on my MAMP stack and it works on 3 other servers, but it won't work on a particular server and keeps giving me a "500 error with an additional 302 error". It's the wildcard that's throwing it and from Google research it says it may be because of an infinite loo...

how to edit .htpasswd using php?

hey all i have a protected directory where only user on .htpasswd can access, but sometimes it requires the user to change password or username, edit a specific username password to his username him self sample users kevien : kka mike : mike And let say i want to change kevien to XYZ And same thing goes to password ...

Codeigniter's URL Rewriting Problem

I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named asset...

htaccess rewrite rule issue - not able to get 10th variable - getting 1st variable appended with a 0(zero) instead

With the following rewrite rule - RewriteRule ^(browse_by_exam)/(classes|packs|tutor_search)/([a-zA-Z0-9.\á\á\â\ä\ã\å\æ\ç\è\é\ê\ë\ì\í\ï\ð\ñ\ò\ó\ô\õ\ö\ø\ù\ú\û\ü\ý\þ\¿\¡\«\»\ÿ\ß\$*!-\=\@#\%\^()_\&{}\;\,\<>\?`\~[\|\"\']\\ +]+)/([0-1])/([0-9]+)/([0-9]+)/([0-9]+),([0-9]+),([a-z]+),([a-z]+)?$ index.php?a=$1&type=$2&search_text=$3&new_search=$...

after .htaccess url rewrite, cannot perform logoff in some of the url rewrited page

Recently, I was doing .htaccess url rewrite, make all my php url into html, in some page, the logout button wont work properly. for example, in page ‘quotedetails/Q9999.html’ (rewrited from ‘quotedetails.php?quoteID=Q9999′), when I click logout button in this page, it wont do the trick, but when i use the old php url of this page, it wor...

.htaccess file, IE not working Firefox, Safari & Chrome working

Hi, I've built a site in Interspire Web Publisher and it was working fine, seems to work in Firefox, Safari and Chrome but when I fired up Internet Explorer 7 & 8 only the home page works, all links to other pages show up nothing. Do you think it could have something to do with the .htaccess file? But why would it work at one point the...

htaccess Rewriterule to make one query part of another

I have a url /embed?t=X and I want to redirect it to /page/embed/X where X is any number of alpha numeric characters. I know must redirect rules go the other way but for the purpose of the applciation I need to reverse it. Any ideas? I have tried things like: RedirectRule ^embed\?t\=([a-zA-Z0-9]+)$ /page/embed/$1 but with no luck. ...

Unexpected htaccess behaviour (mod_rewrite and apache)

Yeah, mod_rewrite is driving me crazy. Here is the problem: my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] when i try to access the page advantix (so address was www.mywebsite.com/advantix), i'm being redirected to advantix/?url=advantix Looking at the access log, i have a suspicious ...

How to setup split test?

I want to create a way to test different layouts on a page to see which get more conversions. For example. If I have 2 versions of a page and I send 50% to page A and 50% to page B and see which one converts more sales. So I am thinking maybe use .htaccess to rewrite half to page A and the other half to page B. But how can I do that w...

Changed the AllowOverride to All and still nothing

I tried to write a .htaccess file on my local pc's website, I've realized I need to set AllowOverride All instead of None searched, found the file /etc/apache2/conf.d/security in the file I found #<Directory /> #AllowOverride None #Order Deny,Allow #Deny from all #</Directory> changed it to <Directory /> AllowOverride All Or...

RewriteRule help

I have successfully setup htaccess to do this: domain.com/ad.php?ad_id=bmw_m3_2498224 INTO: domain.com/ads/bmw_m3_2498224 However, I have a link on the page which makes the page submit to itself... The link saves the ad inside a cookie: domain.com/ad.php?ad_id=bmw_m3_2498224&save=1 // Note the 'save' variable I need to ...

.htaccess rules in Kohana 3.0 ?

Hi I'm running a Kohana setup on my local apache server. I've created a 'htdocs' folder which houses the index.php file in the kohana directory. So that the system files are not available to visitors. Now I wan't to remove index.php from the URL everytime I visit another controller, so I've tried fooling around with the .htaccess provid...

Use .htaccess to change the url PHP sees

I want to use htaccess to not only choose the script that processes the request, but also to change the request uri as php sees it. Can this be done? For example: RewriteRule /funstuff/ funstuff.php ...How can I change that RewriteRule or otherwise change my .htaccess file to get funstuff.php to think that the original request url wa...

Clean URLs for images

I'm unable to get a working .htaccess that should accept clean URLs to load images. I mean, for example, if a user type this: http://mysite.com/image/example It works perfectly, as my PHP process and parse it. However, if the user type: .../image/example.jpg It doesn't work. I mean, if a user writes that, I want to load the module wi...

htaccess rewrite rule to redirect to file or not.

Hi, I have been trying to write a set of htaccess rules that will do the following: With the url: mydomain.com/blog/something If a file called blog.php exists in the web directory(the directory with index.php in) then redirect to blog.php?url=something If blog.php does not exist, redirect to index.php?url=blog/something EDIT: my...

How to hide URL from users when submitting this form?

I have a form with many many fields... When submitting these fields, I use the POST method which hides the actual variables passed along to the PHP page. However, I can't get rid of the complete link. Changing from GET to POST did make all the form fields invisible in the URL, but this part is still visible: mydomain.com/bin/query# ...