GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Can I get some htaccess help, please? (https://gfy.com/showthread.php?t=899070)

Mr Pheer 04-10-2009 07:32 PM

Can I get some htaccess help, please?
 
Ok, here is the problem...

domain.com/blah works
domain.com/blah/ goes to 404 - not good

help?

Ice 04-10-2009 07:40 PM

Ok I was going to try to help but I think this is beyond me.

If domain.com/blah works but domain.com/blah/ doesn't. What can't you just keep it as domain.com/blah

If you can't because there are multiple folders... why can't you just do...

domain.com/blah/folder1
domain.com/blah/folder2

So it still works. Now if you have 100's of folders I understand why you wouldn't want to do that, which is why I said it's beyond my knowledge of htaccess.

split_joel 04-10-2009 07:43 PM

Quote:

Originally Posted by Mr Pheer (Post 15731833)
Ok, here is the problem...

domain.com/blah works
domain.com/blah/ goes to 404 - not good

help?

contact me on aim you should know better :thumbsup

Sam Granger 04-10-2009 07:47 PM

Post your htaccess :)

Juggernaut 04-10-2009 08:03 PM

Even people like myspace have this very same problem, you're not alone.

Code:

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]


This makes the slash always appear and redirects to the slash version without.

2012 04-10-2009 08:29 PM

quuuack.
Google doesn't care, why do you?
- not good. for whom ?

2012 04-10-2009 08:40 PM

Quote:

Originally Posted by Juggernaut (Post 15731882)
Even people like myspace have this very same problem, you're not alone.

Code:

RewriteEngine On

RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]


This makes the slash always appear and redirects to the slash version without.

maybe don't want to do that ? Wordpress handles it nicely.

bump for the masters

2012 04-10-2009 09:23 PM

/
 
do'h

if this is your rule.
RewriteRule ^([^/\.]+)$ index.php?shitsicles=$1 [L]

just make another rule with '/'
RewriteRule ^([^/\.]+)/$ index.php?shitsicles=$1 [L]

update all your other rules

Spunky 04-10-2009 09:25 PM

Just buyanother one,baller

Mr Pheer 04-10-2009 10:21 PM

Quote:

Originally Posted by fartfly (Post 15731911)
quuuack.
Google doesn't care, why do you?
- not good. for whom ?

because I have alot of links going to the trailing slash and now they 404

Mr Pheer 04-10-2009 10:22 PM

thanks for the help guys :)

Steve Awesome 04-10-2009 11:13 PM

Mod Rewrite fucking kicks ass.

Juggernaut 04-10-2009 11:26 PM

Quote:

Originally Posted by fartfly (Post 15731920)
maybe don't want to do that ? Wordpress handles it nicely.

bump for the masters

You should point to one not both. Having a uniform file structure works better than showing the same content from multiple page locations.

I don't use word press.

2012 04-10-2009 11:34 PM

Quote:

Originally Posted by Juggernaut (Post 15732139)
You should point to one not both. Having a uniform file structure works better than showing the same content from multiple page locations.

I don't use word press.

I'm not saying what you said was wrong or something, I just learned something about this.

I'm looking at it like this.

If a search engine finds http://blahblahblahb.com/folder
It's assuming there is an index.html or similar there ?

if it finds http://blahblahblahb.com/folder/
it's assuming the same thing. If it's not you should be assuming it is ?

I think he's right, the correct way to do it would have folder/ and folder.
that's why I said wordpress handles it nicely.

I don't think you should redirect anything.
Or maybe I'm wrong educate me :)

2012 04-10-2009 11:41 PM

it should be as natural as possible , it shouldn't look like it's been manipulated ?

2012 04-11-2009 12:58 AM

Quote:

Originally Posted by fartfly (Post 15731911)
quuuack.
Google doesn't care, why do you?
- not good. for whom ?

wow, was I wrong :Oh crap:upsidedow


All times are GMT -7. The time now is 09:25 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123