Origional problem below semi sorted
im using [CODE
such as if i have a code like
[CODE]^magic-tricks/([A-Za-z0-9-]+)
it will redirect any folder name in urls such as
[CODE]http://www.mysite.com/magic-tricks/anyfoldername
but what if my folder name has 1 or more hyphens in the name
how can i make the [CODE
[QUOTE]
cant seem to find a solution and i have looked but nothing seems to be working
im using the following
[CODE]# Begin search engine friendly links code
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^magic-tricks/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ magic-tricks-$1-$2-$3-$4-$5.php
RewriteRule ^magic-tricks/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ magic-tricks-$1-$2-$3-$4.php
RewriteRule ^magic-tricks/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ magic-tricks-$1-$2-$3.php
RewriteRule ^magic-tricks/([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ magic-tricks-$1-$2.php
RewriteRule ^magic-tricks/([A-Za-z0-9-]+).htm$ magic-tricks-$1.php
RewriteRule ^magic-tricks$ magic-tricks.php
RewriteRule ^articles/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ articles-$1-$2-$3-$4-$5.php
RewriteRule ^articles/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ articles-$1-$2-$3-$4.php
RewriteRule ^articles/([A-Za-z0-9-]+)-([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ articles-$1-$2-$3.php
RewriteRule ^articles/([A-Za-z0-9-]+)-([A-Za-z0-9-]+).htm$ articles-$1-$2.php
RewriteRule ^articles/([A-Za-z0-9-]+).htm$ articles-$1.php
RewriteRule ^articles$ articles.php
Im using this ro re write page names for a certain folder (imaginary) to the php file that has the same name as you cans ee
2 problems, firstly none of them actually work except the ones that Rewrite the main folder name tro the main php file, such as folder magic-tricks Rewriting to magic-tricks.php
and also when people add a trailing slash to the folder name it comes up with 404 error
what am i doing wrong, is there anyway to simplify the above code so i dont have to have so many lines for files with different amounts of words hyphenated in file name instead of having one line for each different amount of hyphens in the file name
i need this working asap and i know its something simple as i have gotten it working before on another site but now it wont, and im using same host and same method as the other one
Solved it for now thanks