PDA

View Full Version : mod rewrite


flashyn
07-06-2005, 09:23 PM
first of all: the script is great! i just love the simplicity and style of it.

one question: at the moment the mod rewrite changes the url to:

is it possible to change the mod rewrite?

i think google likes that "page.html" more than just a director.


thx

Christoph
07-08-2005, 03:41 AM
Hi. I was able to install this great application just fine. Unfortunately, I can't seem to get the "Enable URL rewrite" part to work. I get a 404 error page. When I turn this off, I can load and view my pages just fine.

I even tried turning the mod rewrite "on" in my .htaccess file . . . didn't work. Is there some other configuration step I need to perform?

Any thoughts or help? Thank you!

seothatworks
07-08-2005, 09:46 AM
The main thing is whether your host actually has mod_rewrite installed. I got some error with PHPLD once, for one category, with phpld installed as a subdir on a cms-powered site, but that was fixed by simply changing the name of the category later on.

Christoph
07-08-2005, 03:12 PM
I hope I haven't committed "thread hijacking" here. I apologise to flashyn, and to everyone else, if i have. I would move my post, but don't know how.

Content visible to registered users only.

I am sure that mod_rewrite is installed. I know this for several reasons: (1) It works with other applications (e.g. WordPress) I already have installed; (2) I am a friend of the Server Administrator, and he confirmed that it is installed; (3) A phpinfo() script confirms that it is installed; and (4) I don't get any errors by placing "RewriteEngine on" in an .htaccess file.

Content visible to registered users only.

I have already tried this. That is, I first created a Category, then turned the "Enable URL rewrite" function on. That didn't work. So, I tried various combinations of this strategy; first turning it on, then off, creating categories before or after, etc.

I just want to make sure that it is supposed to work out-of-the-box; that there isn't any post-installed configuration we need to do, etc.

Thank you!

David
07-08-2005, 03:28 PM
Can you paste the contents of the current .htaccess file?
What are you running? (os, php version)

Christoph
07-08-2005, 04:33 PM
Content visible to registered users only.

My .htaccess file only contains that one line (it is in my phplinkdir/ root directory):
Content visible to registered users only.

Content visible to registered users only.

- OS: RedHat Linux (kernal 2.4.21)
- PHP version: 4.3.10
- Apache/1.3.33 (Unix)

seothatworks
07-08-2005, 04:50 PM
You perhaps just didn't copy the .htaccess file coming with PHPLD install, over the old file? It shall read:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [QSA,L]

Christoph
07-08-2005, 04:56 PM
Content visible to registered users only.

That is exactly what I did. Very embarassing. So sorry. It works now.

Thank you very much!

seothatworks
07-08-2005, 05:13 PM
Hehe. It would be great if all the problems were so easy to solve :). Now back to flashyn's question. Though I myself don't think google prefers any kind of extension, not even .html over directory.

David
07-08-2005, 05:21 PM
Content visible to registered users only.

I agree, and can tell you that I have seen some directories that are setup by big SEO companies that just use folders with no extention at all.

flashyn
07-08-2005, 05:54 PM
okay, thx i didn't know that.

steveinid
07-08-2005, 08:20 PM
Content visible to registered users only.

LOL... I did the exact same thing.

Couldn't figure out why my URL rewrite wasn't working.

Ap0s7le
07-08-2005, 09:09 PM
Yeah, it doesn't matter if it's a "directory" or not.

When something looks for "/Home/Pets/" it's actually assuming there is an index file there, which in that case doesn't have to be shown so it's treated as a normal file.

Kinda nice, I've always preferered a proper directory structure, allows things to be organized even though my office isn't.

later

seothatworks
07-09-2005, 05:21 AM
Content visible to registered users only.
:lol:
Someone got url rewrite for my messy desk?

David
07-09-2005, 05:27 AM
Content visible to registered users only.
:lol:
Someone got url rewrite for my messy desk?[/quote]

That was funny. :lol: :lol: :lol:

If you haven't used it in 6 months...burn it! :twisted:

Ap0s7le
07-09-2005, 05:58 AM
LOL!

Honestly... Without sounding like a mad man... I shot a computer once, and then burned it, a couple monitors and a laptop.

It was a really, really bad week.

Hey but look at it this way, I have all new office furniture and a brand new server that's been a doll.

/me knocks on wood

Content visible to registered users only.

I was thinking about releasing it as a mod for all the programmers out there. :lol:

David
07-16-2005, 11:46 PM
It would be cool if there were a couple of different url rewrite methods available so people could list categories in different fahions like:
assuming 1 (cars) in a main category and 2 (mustang) is sub
site.com/cat/1/ and site.com/cat/1/2/
site.com/cars.htm and site.com/cars/mustang.htm
could replace hml with just about any extension (asp, cfm, html), even if not running those languages. :)

I like the idea of adding these options, so that we don't get too much similarity between different directories, and for people that want to display their own dataset on more than one site, it will help to reduce the duplicate content radar.

cjason
07-28-2005, 04:50 PM
Just in case anybody else comes across a mod rewrite problem and it seems like everything should be working...

I have my PHPLD installed in a subdirectory (I have Wordpress installed in the root) and I had to modify the PHPLD .htaccess file as follows:

RewriteEngine On
RewriteBase /directory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [QSA,L]

Hope this helps.

Steven Myers
06-06-2006, 05:20 PM
* Bump * How about for 3.05?

Here's my .htaccess including the above that cjason gave out. Note: this is just the bottom part of my .htaccess ;)

Content visible to registered users only.

euwebdirectory
06-06-2006, 06:10 PM
Content visible to registered users only.
Please, i need this mod ... for my "Directorio web", i´ll change the script to phpld ... can you send me?

Boby
06-08-2006, 11:52 AM
phpLD URL Rewrite Mod (http://www.phplinkdirectory.com/forum/showthread.php?p=2856#post2856)
Check first post (I've re-uploaded attachment)

Boby

jaffa
06-18-2006, 05:21 AM
Thank you everyone for this thread.

I had the same problem and fixed it by uploading the .htaccess file again.
My new problem now is that my "logo image" doesn't show up in the category pages
(when clicking on category links).
It still shows in the .php files like; submit.php and index.php

Any help will be much apreciated
Mel

jaffa
06-18-2006, 05:30 AM
I fixed this issue by using the full url to the image.

Instead of
Content visible to registered users only.
Use
Content visible to registered users only.

This thread is really good and help me heaps.
Thanks