The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL Rewriting
#1
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!!!!
  Reply
#2
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.
  Reply
#3
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.
  Reply
#4
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)