0

Hello. I have no idea how, so i'll ask you.

I need /s/index.php?i=123

to be

/s/123

any direction or tips would be appreciated!

cheers,
Sorcher

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Sorcher
0

In .htaccess file create the code below :

RewriteEngine on
RewriteRule ^s/([0-9]*)/?$ s/index.php?i=$1 [L,QSA]

or

RewriteRule ^([0-9]*)/?$ index.php?i=$1 [L,QSA]

Remember if you use rewriterule using .htaccess in your local server (the case i'm use xampp), you must uncomment the line:
LoadModule rewrite_module modules/mod_rewrite.so in file httpd.conf

for default it has # prefix
#LoadModule rewrite_module modules/mod_rewrite.so, just remove the #.

Find file named httpd.conf in folder "xampp -> apache -> conf".

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.