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)
-   -   anyone here expert at rewrite for .htaccess with dynamic urls (https://gfy.com/showthread.php?t=876497)

spacedog 12-18-2008 08:26 PM

anyone here expert at rewrite for .htaccess with dynamic urls
 
I need help with dynamic url rewrite in .htaccess..

I give free blog post on pr 2 videos/movies blog if you make my problem go away.

348-132-803 <<<

CS-Jay 12-18-2008 08:27 PM

I'm not a huge expert but I've done all my sites. I could help if you like to hit me up

fris 12-18-2008 09:04 PM

post the question here, you will get more help that way

Tube Ace 12-18-2008 09:06 PM

post what you need here and I can help.

spacedog 12-18-2008 09:08 PM

I have this in .htaccess

PHP Code:

Options +FollowSymLinks
RewriteEngine on
RewriteCond 
%{HTTP_HOST} !^www\.domain\.com
RewriteRule 
(.*) http://www.domain.com/$1 [R=301,L]
RewriteRule ^index.php?page=([0-9]+)&cat=([0-9]+)$  index.php?page=$1&cat=$[L]
RewriteCond %{QUERY_STRING} .  
RewriteRule ^/?$ http://mysponsors404page.com [L] 


Now.. my site dynamically generates archives as more galleries are added, and so have

domain.com
domain.com/index.php?page=1
domain.com/index.php?page=2 and so on as many pages as I have..

Problem I have though is when someone types in query such as domain.com?anything it still shows index and I want it to go to 404, which the above .htaccess solved when I added it, however..

when it is domain.com/index.php?anything it does not 404 and the last thing is about pages that have yet to be created and do not exist yet..so, how would I make page=18 404 if I only have say 15 pages?

Ivan Fuckalot 12-18-2008 09:11 PM

you can donate me $5
http://www.htaccesstools.com

spacedog 12-18-2008 09:25 PM

Quote:

Originally Posted by Ivan Fuckalot (Post 15215864)
you can donate me $5
http://www.htaccesstools.com

answer not there.. no $5 for you :winkwink:

spacedog 12-18-2008 09:38 PM

this one's in regards to blogs..

.htaccess has;

PHP Code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase 
/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.+)$ /index.php/$[L]
</
IfModule>

# END WordPress
<Files .htaccess>
order allow,deny
deny from all
</Files>
RewriteCond %{HTTP_HOST} !^www\.blog\.net
RewriteRule 
(.*) http://www.blog.net/$1 [R=301,L]
RewriteCond %{QUERY_STRING} .   
RewriteRule ^/?$ http://www.404page.com [L] 

So, when user types blog.net?whatever it goes 404 to external 404 page....

yet, when user types blog.net/postname?whatever or blog.net/postname/?whatever or blog.net/category/postname?whatever it don't go to 404 and just shows the page????

spacedog 12-18-2008 09:47 PM

I also see that page=1 I can make into page=1&whateverifuckingwant or page=1?fuckingbitch, etc also show page=1, but I want them to go to 404.

spacedog 12-18-2008 10:19 PM

where's smokey? I bet he know's the answer

leek 12-19-2008 08:23 AM

Quote:

Originally Posted by spacedog (Post 15215715)
I give free blog post on pr 2 videos/movies blog if you make my problem go away.

I'll get up with you soon on that blog post.

Dopy 12-19-2008 08:45 AM

Quote:

Originally Posted by spacedog (Post 15215858)

how would I make page=18 404 if I only have say 15 pages?


The script should handle the page out of range either by delivering page 1 or redirect 404.


All times are GMT -7. The time now is 11:08 PM.

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