: Htaccess only works for one I currently use the following htaccess code to remove php extensions and also allow the /index.php page to load without the word "index": RewriteRule ^$ index.php
I currently use the following htaccess code to remove php extensions and also allow the /index.php page to load without the word "index":
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+[^/])$ .php [L]
I used to create a new page for every single user but as one could probably see, this is not such a good idea. So i deleted all the user pages and i would include them a different way but i would need to pass the requested page as a get parameter to another file. So I decided to route every main level (/) requested page through a file in a different directory, like so:
RewriteRule ^([^/]+)$ some/page.php?requested_page= [L,QSA,NC]
But it does not work with the /index.php page if someone just requested it like this: /
i changed the code to:
RewriteRule ^(<?!)([^/]+)$ some/page.php?requested_page= [L,QSA,NC]
and now the "/" request works and any page that really exist works, but the "fake user pages" now dont work. is there way i can do both?
More posts by @Carla537
1 Comments
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.