The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
URL Rewriting - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20) +--- Forum: New to UserSpice? (https://userspice.com/forums/forumdisplay.php?fid=22) +--- Thread: URL Rewriting (/showthread.php?tid=387) |
URL Rewriting - jason - 12-09-2016 Hi all, First, good job on work done on Userspice. It's pretty simple and easy with basics. I have a problem with removing the .php in all urls. I've tried several codes online creating and updating .htaccess file for hours but no luck. It either doesnt work or with errors. Could someone please help me out on what to do PLEASE???? HELP!!!! URL Rewriting - dan - 12-09-2016 I think the feature you needis called apache mod rewrite. We don't do it by default because not all servers have it and it breaks things if not configured properly. I do want to mess with that feature more. URL Rewriting - dan - 12-09-2016 Oh... And thanks for the compliments. I am on vacation and don't have access to a computer to give you better answers at the moment. I know a week or two ago someone got it working on the forums if you do a search. URL Rewriting - jason - 12-10-2016 Thanks for the reply. I got it working with this code below. Someone else might find it useful. RewriteEngine on RewriteCond {3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}{REQUEST_FILENAME} !-d RewriteCond {3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html RewriteCond {3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}{REQUEST_FILENAME} !-d RewriteCond {3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php Just that the pages loads either .php is specified or not and still maintain the entered url. What I was hoping for was to remove .php even if specified. |