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)
-   -   Wordpress, .htaccess, and mod rewrite question (https://gfy.com/showthread.php?t=966427)

tonyparra 05-02-2010 05:31 PM

Wordpress, .htaccess, and mod rewrite question
 
Hello. I have some issues with the mod_rewrite. My situation is i have domain like so with wordpress being installed on the tld www.domain.com. I have .php pages though, that i cant import into wordpress, they are like so www.domain.com/1/page.php, www.domain.com/2/page.php, and so on. I would like to rewrite those .php extensions into .html or .htm. My problem is when i add this rules

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [NC]

it doesnt work and i cant log into my wordpress backend. I added that to the .htaccess file on the root level, and didnt touch any of the other wordpress stuff. Anyone know how to properly do this?

AmeliaG 05-02-2010 05:35 PM

I'd attempt to use the pages feature in WordPress if possible, maybe specific 301s if it is just a few pages I want to go elsewhere without losing SEO juice.

fatfoo 05-02-2010 05:35 PM

Try asking your host support to help you with your problems.

fris 05-02-2010 05:48 PM

Quote:

Originally Posted by tonyparra (Post 17096687)
Hello. I have some issues with the mod_rewrite. My situation is i have domain like so with wordpress being installed on the tld www.domain.com. I have .php pages though, that i cant import into wordpress, they are like so www.domain.com/1/page.php, www.domain.com/2/page.php, and so on. I would like to rewrite those .php extensions into .html or .htm. My problem is when i add this rules

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [NC]

it doesnt work and i cant log into my wordpress backend. I added that to the .htaccess file on the root level, and didnt touch any of the other wordpress stuff. Anyone know how to properly do this?

this will check to make sure a .html file doesnt exist already

http://www.domain.com/site.php will work as
http://www.domain.com/site.html

as well as dirs

http://www.domain.com/directory/sammy.php will work as
http://www.domain.com/directory/sammy.html

Code:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^(/.+\.)html$ [NC]
RewriteCond %{DOCUMENT_ROOT}%1php -f
RewriteRule \.html$ %1php [NC,QSA,L]


tonyparra 05-02-2010 07:28 PM

Quote:

Originally Posted by fatfoo (Post 17096696)
Try asking your host support to help you with your problems.

bot alert
:error

tonyparra 05-02-2010 07:30 PM

Quote:

Originally Posted by fris (Post 17096718)
this will check to make sure a .html file doesnt exist already

http://www.domain.com/site.php will work as
http://www.domain.com/site.html

as well as dirs

http://www.domain.com/directory/sammy.php will work as
http://www.domain.com/directory/sammy.html

Code:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^(/.+\.)html$ [NC]
RewriteCond %{DOCUMENT_ROOT}%1php -f
RewriteRule \.html$ %1php [NC,QSA,L]


you sir are a scholar and a gentleman will try now and report :thumbsup

tonyparra 05-02-2010 07:37 PM

thats it thanks thread closed.:thumbsup

LoveSandra 05-03-2010 01:27 AM

Quote:

Originally Posted by fatfoo (Post 17096696)
Try asking your host support to help you with your problems.

:2 cents::thumbsup:thumbsup:thumbsup

fris 05-03-2010 07:09 AM

Quote:

Originally Posted by tonyparra (Post 17096841)
thats it thanks thread closed.:thumbsup

no problem.


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

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