By g33kiel33t
Hello,
I am facing an issue which I can’t resolve.
this is my .htaccess file <pre> Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([\w\d~%.:_-]+)$ index.php?page=$1 [QSA] RewriteRule ^news/([0-9]+) /news?id=$1 RewriteRule ^contact/([0-9]+) /contact?do=$1 RewriteRule ^account/([0-9]+) /account?action=$1 RewriteRule ^admin/([0-9]+) /admin?action=$1 </pre>
Everything works beside the admin and account rules when I go the one if the working once, Then I get to the requested page i.e www.domain.com/page or www.domain.com/news/3
All working rules are ending in numbers, like the news rules, But admin and account rule doesn’t end in a number, but in a string, like www.domain.com/account/settings
which doesn’t work.
Anyone able to help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
nwm I got it working :) <br> <br>Solution for others: <br>([0-9]+) only matches numbers. If you want to match Strings, use either (.+) to match every character or some other character group ([a-zA-Z]+ for example).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.