GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   .htaccess pretty URL question (https://gfy.com/showthread.php?t=1128088)

rastan 12-07-2013 02:00 PM

.htaccess pretty URL question
 
I need some rewrite help from a kind soul.

Okay, so I've got a domain with stuff on, and I want to refresh it with NEW stuff
So I set my stuff up in a subfolder /v2 and get everything working fine in there.
Now I wand to switch things over.
I can do simple 301/302 redirects to point the traffic to the new folder, but IDEALLY what I want is for stuff like

http://mydomain.com/v2/index.php to be read by browsers as
http://mydomain.com/index.php

removing the /v2/ from the URLs.
Im sure there's a rewrite pattern that can get that working

I've tried a couple of solutions I found on stack overflow but nothings hit the spot yet.

dunhill 12-07-2013 07:46 PM

RewriteRule ^(.*)?$ /v2/$1 [L]

rastan 12-08-2013 01:40 PM

thx man, will try it


All times are GMT -7. The time now is 05:21 PM.

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