Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/245238-rewriterule-to-fit-all-of-my-urls/
Share on other sites

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

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.