1
deka87
.htaccess URL rewrite mod. is it compatible with Xoops?
  • 2008/10/23 13:08

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi,

I came across this article http://corz.org/serv/tricks/htaccess2.php on URL rewriting with .htacces. i've carefully read it and wanted to apply it on the profile module (to replace http://www.mysite/modules/profile/userinfo.php?uid=777 with http://www.mysite/modules/profile/777 but it didnt really work. .htaccess didn't change a thing. I wonder if it's just that XOOPS is incompatible with this mod_rewrite or i'm just a lamer?
Mind anchors

2
deka87
Re: .htaccess URL rewrite mod. is it compatible with Xoops?
  • 2008/10/24 5:26

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


hello?
Mind anchors

3
ghia
Re: .htaccess URL rewrite mod. is it compatible with Xoops?
  • 2008/10/24 8:28

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


URL rewriting is a function of Apache and is suitable for all kinds of URL, also these from XOOPS. It needs only the right conversion rules.

Did you check if the module mod_rewrite of Apache is activated?
Try this:
- Create a directory named test in your site root: http://www.yoursite.com/test/ .
- Create a file test.html in this directory with content:
<html>
<
head>
<
title>Testtitle>
head>
<
body>OK !body>
html>

- Check if http://www.yoursite.com/test/test.html says 'OK !'.
- In this directory create a file .htaccess with this content:
Options +FollowSymlinks
RewriteEngine on
RewriteRule 
^unknown.html$  /test/test.html [L]

- Try to access http://www.yoursite.com/test/unknown.html
If it gives error 404 then your system is not set up for URL rewriting.

Edit:
The code tags are not displaying the enclosed code correctly!!!
This is what it should say:
Quote:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^unknown\.html$ /test/test.html [L]
Or in plain:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^unknown\.html$ /test/test.html [L]

How can we share code if the code tag is not functioning properly?

4
deka87
Re: .htaccess URL rewrite mod. is it compatible with Xoops?
  • 2008/10/24 18:03

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


it works well. maybe i messed up the code. how would you change the url for the profile module as I mentioned in my 1st post?
Mind anchors

5
deka87
Re: .htaccess URL rewrite mod. is it compatible with Xoops?
  • 2008/11/7 11:10

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


the problem is fixed
Mind anchors

Login

Who's Online

487 user(s) are online (365 user(s) are browsing Support Forums)


Members: 0


Guests: 487


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits