ukweb Posted July 11, 2009 Share Posted July 11, 2009 Hi I have constructed the following .htaccess file: RewriteEngine on RewriteRule ^dir/([0-9]+)/?$ /index.php?file=$1 [L] Options +FollowSymLinks RewriteCond %{HTTP_HOST} ^colwynbayhonda.com RewriteRule (.*) http://www.colwynbayhonda.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.colwynbayhonda.com/ [R=301,L] AddHandler php5-script .php ...And MOST of it works lovely! However, my page queries follow the following pattern: mysite.com/index.php?file=<filename> line 2 of the .htaccess is meant to allow the following ruleset: mysite.com/<filename> would point to mysite.com/index.php?file=<filename> but it dont bloody work!!! any ideas? Thanks in advance Ste x Link to comment https://forums.phpfreaks.com/topic/165589-mods_rewrite-and-my-php-pages-help/ Share on other sites More sharing options...
wildteen88 Posted July 11, 2009 Share Posted July 11, 2009 line 2 of the .htaccess is meant to allow the following ruleset: mysite.com/<filename> would point to mysite.com/index.php?file=<filename> but it dont bloody work!!! any ideas? By line 2 are you refering to this line? RewriteRule ^dir/([0-9]+)/?$ /index.php?file=$1 [L] If thats case then your url mysite.com/<filename> wll not work as it is expecting a url like [m]mysite.com/dir/<some number here>[/b] Link to comment https://forums.phpfreaks.com/topic/165589-mods_rewrite-and-my-php-pages-help/#findComment-873468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.