.htaccess rewrite php

shaistar

New Member
Messages
25
Reaction score
1
Points
0
Hello Everybody,

This is my first time posting! I'm new and am having a little trouble. I have a php website and would like to make the urls look like this/instead/of -> this?which=is&terrible=forSEO. Could anybody show me how to do this. I know it has something to do with a .htacess file, but I have no idea how to do it. I apologize if you guys get tired of answering questions like this, but I made every effort to understand it through google and I just don't get it.

Sincerely and thankfully,
Shai
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
Only if you tell us exactly how you want the paths to look like,

e.g. what does this/map/to in terms of this?somethinggoeshere
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
are section=example&page=anotherone exactly what you want? Because the mapping changes if you start changing keywords.

Essentially what you want to do if that's the case is grab the subfolders, and put them into a RedirectRule.

You're gonna want to watch for XSS attacks and injections though...
 

shaistar

New Member
Messages
25
Reaction score
1
Points
0
XSS attacks = moving up directories right? Because in my code I figured if I disabled the use of .'s and /'s I could avoid that. Injections = Taking stuff off my url. I put an error page for that. Is there anything else I should do? I do want it to look like that though. :smile:
 
Top