wright67uk Posted August 19, 2011 Share Posted August 19, 2011 I have about 100 pages, which are all in the same format as the three URLs in my .htaccess file as below eg. COURIER\.php?subtype=COURIER instead of making 100 RewriteRules is it possible to make one RewriteRule that all of my URLs can use? <Files ~ "^\.(htaccess|htpasswd)$"> allow from all </Files> AddHandler x-httpd-php5 .php AddHandler x-httpd-php .php4 Options +Indexes +FollowSymlinks -MultiViews RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^(mysite\.co\.uk)(:80)? [NC] RewriteRule ^(.*) http://www.mysite.co.uk/$1 [R=301] RewriteRule ^courier\.*$ COURIER\.php?subtype=COURIER [NC,L,N] RewriteRule ^valeting\.*$ VALETING\.php?subtype=VALETING [NC,L,N] RewriteRule ^sales\.*$ SALES\.php?subtype=SALES [NC,L,N] order deny,allow Quote Link to comment https://forums.phpfreaks.com/topic/245238-rewriterule-to-fit-all-of-my-urls/ Share on other sites More sharing options...
requinix Posted August 19, 2011 Share Posted August 19, 2011 Are your files actually named in uppercase? Why? Quote Link to comment https://forums.phpfreaks.com/topic/245238-rewriterule-to-fit-all-of-my-urls/#findComment-1259603 Share on other sites More sharing options...
wright67uk Posted August 20, 2011 Author Share Posted August 20, 2011 Some of them are :-\ To be honest with you I used to host on Windows server, and didnt really thing a great deal about the case of my file names, then I discovered that linux was a better option for dynamic sites I've used nc in my flags but id like to learn how to make a rule that will effect all of my urls Quote Link to comment https://forums.phpfreaks.com/topic/245238-rewriterule-to-fit-all-of-my-urls/#findComment-1259714 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.