Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In my webfolder on my server in the .htaccess file i have the following
RewriteEngine on
RewriteRule /([0-9]+) /index.php
and when i try to go to http://mypage.com/22 for example, it saying that the link is broken. why wont index.php be shown when i write a number after the / as in the example ?
now going to http://mypage.com/22 gives me what i wants, however any number in my url do this now, if i where to go to http://mypage.com/subfolder/5.php it would point me back to the index.php in the rewrite rule, how can i make it not do that for subfolders and files in subfolders etc?
When i added that to my .httacces file i get "this link is broken" if i go to http://mypage.com/22 but if i remove the / from index.php it works again however i cant use /22 anymore ofcourse.
When i added that to my .httacces file i get "this link is broken" if i go to http://mypage.com/22 but if i remove the / from index.php it works again however i cant use /22 anymore ofcourse.
I said it's gotta go in httpd.conf in the <Directory /> tag. I didn't test it in .htaccess.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.